Enhance tab management by tracking removal of tabs initiated by the startup page

This commit is contained in:
mr. M
2025-02-23 13:48:57 +01:00
parent 4352051c6e
commit c4480f208f
2 changed files with 24 additions and 15 deletions

View File

@@ -614,6 +614,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
currentTab.hasAttribute('zen-empty-tab')
) {
this.selectEmptyTab();
this._removedByStartupPage = true;
gBrowser.removeTab(currentTab);
showed = true;
}
@@ -638,7 +639,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
}
handleTabBeforeClose(tab) {
if (!this.workspaceEnabled || this.__contextIsDelete) {
if (!this.workspaceEnabled || this.__contextIsDelete || this._removedByStartupPage) {
return null;
}