forked from ZenBrowserMirrors/zen-desktop
Fixed reordering tabs with glance and hidden tabs in workspaces
This commit is contained in:
parent
9aa48b2645
commit
41617183ab
2 changed files with 6 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..c8fc61c310df678f7a74f4b0fe390bcb07e02291 100644
|
||||
index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..dd8fba935e26aa0f00b687f23b64935dfcf339fa 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -406,11 +406,50 @@
|
||||
|
@ -413,7 +413,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..c8fc61c310df678f7a74f4b0fe390bcb
|
|||
// Don't allow mixing pinned and unpinned tabs.
|
||||
if (aTab.pinned) {
|
||||
- aIndex = Math.min(aIndex, this.pinnedTabCount - 1);
|
||||
+ aIndex = aTab.hasAttribute('zen-essential') ? Math.min(aIndex, this._numVisiblePinTabsWithoutGlance) : Math.min(aIndex, this._numVisiblePinTabs);
|
||||
+ aIndex = aTab.hasAttribute('zen-essential') ? Math.min(aIndex, this._numZenEssentials) : Math.min(aIndex, this._numVisiblePinTabs - 1);
|
||||
} else {
|
||||
- aIndex = Math.max(aIndex, this.pinnedTabCount);
|
||||
+ aIndex = Math.max(aIndex, this._numVisiblePinTabsWithoutGlance + this._numZenEssentials);
|
||||
|
@ -425,7 +425,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..c8fc61c310df678f7a74f4b0fe390bcb
|
|||
|
||||
this._handleTabMove(aTab, () => {
|
||||
- let neighbor = this.tabs[aIndex];
|
||||
+ let neighbor = this.tabs.filter(tab => !tab.hasAttribute("zen-glance-tab"))[aIndex];
|
||||
+ let neighbor = this.tabs.filter(tab => !tab.hasAttribute("zen-glance-tab") && !tab.hasAttribute("zen-empty-tab"))[aIndex];
|
||||
if (forceStandaloneTab && neighbor.group) {
|
||||
neighbor = neighbor.group;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue