feat: Dont switch permanent keys for window closes, b=closes #12152, c=workflows, flatpak

This commit is contained in:
mr. m
2026-02-24 23:19:46 +01:00
parent a8ccd1ca3c
commit 353b65e25b
3 changed files with 11 additions and 10 deletions

View File

@@ -734,12 +734,14 @@ class nsZenWindowSync {
aOurTab.ownerGlobal.gBrowser.swapBrowsersAndCloseOther(aOurTab, aOtherTab, false);
// Swap permanent keys
const ourPermanentKey = aOurTab.linkedBrowser.permanentKey;
const otherPermanentKey = aOtherTab.linkedBrowser.permanentKey;
aOurTab.linkedBrowser.permanentKey = otherPermanentKey;
aOtherTab.linkedBrowser.permanentKey = ourPermanentKey;
aOurTab.permanentKey = otherPermanentKey;
aOtherTab.permanentKey = ourPermanentKey;
if (!onClose) {
const ourPermanentKey = aOurTab.linkedBrowser.permanentKey;
const otherPermanentKey = aOtherTab.linkedBrowser.permanentKey;
aOurTab.linkedBrowser.permanentKey = otherPermanentKey;
aOtherTab.linkedBrowser.permanentKey = ourPermanentKey;
aOurTab.permanentKey = otherPermanentKey;
aOtherTab.permanentKey = ourPermanentKey;
}
// Since we are moving progress listeners around, there's a chance that we
// trigger a load while making the switch, and since we remove the previous