mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-08 10:56:36 +00:00
Fixed unpinning tabs
This commit is contained in:
@@ -369,7 +369,7 @@
|
|||||||
#zen-browser-tabs-wrapper {
|
#zen-browser-tabs-wrapper {
|
||||||
min-height: fit-content;
|
min-height: fit-content;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: clip;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
scrollbar-width: thin;
|
scrollbar-width: thin;
|
||||||
}
|
}
|
||||||
|
@@ -359,7 +359,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
const delta = event.delta * 500;
|
const delta = event.delta * 300;
|
||||||
this._swipeState.lastDelta = delta;
|
this._swipeState.lastDelta = delta;
|
||||||
|
|
||||||
if (Math.abs(delta) > 1) {
|
if (Math.abs(delta) > 1) {
|
||||||
@@ -1625,9 +1625,11 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||||||
this._lastSelectedWorkspaceTabs[window.uuid] = newTab;
|
this._lastSelectedWorkspaceTabs[window.uuid] = newTab;
|
||||||
}
|
}
|
||||||
// Always make sure we always unselect the tab from the old workspace
|
// Always make sure we always unselect the tab from the old workspace
|
||||||
currentSelectedTab._selected = false;
|
if (currentSelectedTab && currentSelectedTab !== tabToSelect) {
|
||||||
currentSelectedTab._visuallySelected = true; // we do want to animate the tab deselection
|
currentSelectedTab._selected = false;
|
||||||
this._beforeSelectedTab = currentSelectedTab;
|
currentSelectedTab._visuallySelected = true; // we do want to animate the tab deselection
|
||||||
|
this._beforeSelectedTab = currentSelectedTab;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async _updateWorkspaceState(window, onInit) {
|
async _updateWorkspaceState(window, onInit) {
|
||||||
@@ -1639,7 +1641,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||||||
|
|
||||||
// Update workspace UI
|
// Update workspace UI
|
||||||
await this._updateWorkspacesChangeContextMenu();
|
await this._updateWorkspacesChangeContextMenu();
|
||||||
document.getElementById('tabbrowser-tabs')._positionPinnedTabs();
|
|
||||||
gZenUIManager.updateTabsToolbar();
|
gZenUIManager.updateTabsToolbar();
|
||||||
await this._propagateWorkspaceData({ clearCache: false });
|
await this._propagateWorkspaceData({ clearCache: false });
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..c90119b4b248887fd8612beb9aac83c6eeb57088 100644
|
index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..cbeb4472fdc7dc12c2a45a0c578d166c1cac1b6b 100644
|
||||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
@@ -406,11 +406,39 @@
|
@@ -406,11 +406,39 @@
|
||||||
@@ -57,8 +57,12 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..c90119b4b248887fd8612beb9aac83c6
|
|||||||
}
|
}
|
||||||
aTab.setAttribute("pinned", "true");
|
aTab.setAttribute("pinned", "true");
|
||||||
this._updateTabBarForPinnedTabs();
|
this._updateTabBarForPinnedTabs();
|
||||||
@@ -831,7 +859,7 @@
|
@@ -828,10 +856,10 @@
|
||||||
this.tabContainer.arrowScrollbox.prepend(aTab);
|
// the moving of a tab from the vertical pinned tabs container
|
||||||
|
// and back into arrowscrollbox.
|
||||||
|
aTab.removeAttribute("pinned");
|
||||||
|
- this.tabContainer.arrowScrollbox.prepend(aTab);
|
||||||
|
+ ZenWorkspaces.activeWorkspaceStrip.prepend(aTab);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
- this.moveTabTo(aTab, this.pinnedTabCount - 1, {
|
- this.moveTabTo(aTab, this.pinnedTabCount - 1, {
|
||||||
|
Reference in New Issue
Block a user