Fixed changing tabs while having glance open

This commit is contained in:
mr. m
2025-02-28 00:30:02 +01:00
parent fc1ec9123d
commit 7d4641c5ec

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
index fa96568d366fd3608f9bd583fa793150bd815c8b..5e25d78b04675fbb736192fb0bbcbf6067cbc257 100644
index fa96568d366fd3608f9bd583fa793150bd815c8b..2ef63a6b462f28029f02decf14ad93de88446bab 100644
--- a/browser/components/tabbrowser/content/tabs.js
+++ b/browser/components/tabbrowser/content/tabs.js
@@ -94,7 +94,7 @@
@@ -150,7 +150,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..5e25d78b04675fbb736192fb0bbcbf60
+ if (glanceTab) {
+ // insert right after the parent tab. note: it must be inserted before
+ // the last pinned tab so it can be inserted in the correct order
+ this.#allTabs.splice(Math.min(i + 1, lastPinnedTabIdx), 0, glanceTab);
+ this.#allTabs.splice(Math.max(i + 1, lastPinnedTabIdx), 0, glanceTab);
+ i++;
+ } else if (this.#allTabs[i].classList.contains("vertical-pinned-tabs-container-separator")) {
+ // remove the separator from the list