Fix: Correctly insert glance tab after the parent tab in the tab list

This commit is contained in:
mr. M
2025-02-17 22:35:54 +01:00
parent 84bbb4ba63
commit bf34c9a9c3

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
index 8aeb244ffca9f48661805f5b7d860b5896055562..393458caa425e0a980223cd3800ea0ef33542c84 100644
index 8aeb244ffca9f48661805f5b7d860b5896055562..117def8115affccadacfb75da57315ff7eed44ef 100644
--- a/browser/components/tabbrowser/content/tabs.js
+++ b/browser/components/tabbrowser/content/tabs.js
@@ -94,7 +94,7 @@
@@ -133,7 +133,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..393458caa425e0a980223cd3800ea0ef
+ const glanceTab = this.#allTabs[i].querySelector("tab[zen-glance-tab]");
+ if (glanceTab) {
+ // insert right after the parent tab
+ this.#allTabs.splice(Math.min(i + 1, lastPinnedTabIdx), 0, glanceTab);
+ this.#allTabs.splice(i + 1, 0, glanceTab);
+ i++;
+ } else if (this.#allTabs[i].classList.contains("vertical-pinned-tabs-container-separator")) {
+ // remove the separator from the list