forked from ZenBrowserMirrors/zen-desktop
fix: enhance tab unloading logic with permitUnload check and update candidate version and update to firefox 136.0.2
This commit is contained in:
parent
ad04961d19
commit
025f994c62
8 changed files with 28 additions and 12 deletions
|
@ -510,6 +510,10 @@
|
|||
case 'unload-switch':
|
||||
case 'reset-switch':
|
||||
case 'switch':
|
||||
let { permitUnload } = selectedTab.linkedBrowser?.permitUnload();
|
||||
if (!permitUnload) {
|
||||
return;
|
||||
}
|
||||
this._handleTabSwitch(selectedTab);
|
||||
if (behavior.includes('reset')) {
|
||||
this._resetTabToStoredState(selectedTab);
|
||||
|
@ -520,8 +524,7 @@
|
|||
}
|
||||
// Do not unload about:* pages
|
||||
if (!selectedTab.linkedBrowser?.currentURI.spec.startsWith('about:')) {
|
||||
gBrowser.explicitUnloadTabs([selectedTab]);
|
||||
selectedTab.removeAttribute('linkedpanel');
|
||||
gZenTabUnloader.explicitUnloadTabs([selectedTab], { permitUnload });
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue