forked from ZenBrowserMirrors/zen-desktop
Refactor tab handling logic to improve neighbor tab selection in standalone mode
This commit is contained in:
parent
8a5b0928c5
commit
40ce0b714e
1 changed files with 3 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 628aa6596627c85efe361fc1ece8fd58f7ee653e..6bd5149f4be6c18cbf733b5b9ee01534af61bef9 100644
|
||||
index 628aa6596627c85efe361fc1ece8fd58f7ee653e..cd3ad53dbe399383178d0eff459ad72079b02024 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -412,11 +412,50 @@
|
||||
|
@ -529,13 +529,11 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..6bd5149f4be6c18cbf733b5b9ee01534
|
|||
} else {
|
||||
aIndex = Math.max(aIndex, this.pinnedTabCount);
|
||||
}
|
||||
@@ -5684,11 +5821,18 @@
|
||||
}
|
||||
@@ -5685,10 +5822,17 @@
|
||||
|
||||
this._handleTabMove(aTab, () => {
|
||||
- let neighbor = this.tabs[aIndex];
|
||||
let neighbor = this.tabs[aIndex];
|
||||
- if (forceStandaloneTab && neighbor.group) {
|
||||
+ let neighbor = this.tabs.filter(tab => !tab.hasAttribute("zen-glance-tab"))[aIndex];
|
||||
+ const _tPos = aTab._tPos;
|
||||
+ if ((forceStandaloneTab && neighbor.group) || neighbor.group?.hasAttribute("split-view-group")) {
|
||||
neighbor = neighbor.group;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue