no-bug: Add a switch case for pin unloading (gh-13317)

This commit is contained in:
mr. m
2026-04-19 18:34:19 +02:00
committed by GitHub
parent 049c39839f
commit 3fa5b4867c
2 changed files with 8 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index 2643e1a2aa14ba5cb4a64a92e1c2dfa5f07d242f..451feb3d412cbf20f2a65bfa73bdbafb7506bdc5 100644
index 2643e1a2aa14ba5cb4a64a92e1c2dfa5f07d242f..1b2aacc43c3e3b9ef13a1984458fa2cbd4b1418a 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -413,6 +413,7 @@
@@ -597,7 +597,7 @@ index 2643e1a2aa14ba5cb4a64a92e1c2dfa5f07d242f..451feb3d412cbf20f2a65bfa73bdbafb
+ this.selectedTab = newTab;
+ }
+ }
+ animate &&= !aTab.splitView;
+ animate &&= !aTab.group?.hasAttribute("split-view-group");
+
let isVisibleTab = aTab.visible;
// We have to sample the tab width now, since _beginRemoveTab might

View File

@@ -371,6 +371,12 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature {
for (const tab of pinnedTabs) {
tab.removeAttribute("discarded");
}
} else if (pinnedTabs.some(tab => tab.selected)) {
const selectedTabs = pinnedTabs.filter(tab => tab.selected);
gBrowser.selectedTab = gBrowser._findTabToBlurTo(
selectedTabs[0],
selectedTabs
);
}
if (behavior.includes("reset")) {
for (const tab of pinnedTabs) {