Fixed unpinning tabs

This commit is contained in:
mr. m
2025-02-12 12:39:13 +01:00
parent 22cad83c8f
commit 40a843200f
3 changed files with 14 additions and 9 deletions

View File

@@ -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;
} }

View File

@@ -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,10 +1625,12 @@ 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
if (currentSelectedTab && currentSelectedTab !== tabToSelect) {
currentSelectedTab._selected = false; currentSelectedTab._selected = false;
currentSelectedTab._visuallySelected = true; // we do want to animate the tab deselection currentSelectedTab._visuallySelected = true; // we do want to animate the tab deselection
this._beforeSelectedTab = currentSelectedTab; this._beforeSelectedTab = currentSelectedTab;
} }
}
async _updateWorkspaceState(window, onInit) { async _updateWorkspaceState(window, onInit) {
// Update document state // Update document state
@@ -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 });

View File

@@ -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, {