mirror of
https://github.com/zen-browser/desktop.git
synced 2026-07-20 07:31:09 +00:00
fix: Fixed restoring previous tab on other workspaces, b=(no-bug), c=compact-mode, workspaces
This commit is contained in:
@@ -561,7 +561,7 @@ var gZenCompactModeManager = {
|
||||
_onTabOpen(event) {
|
||||
const tab = event.target;
|
||||
if (!tab.selected && this.preference && !this.isSidebarPotentiallyOpen()) {
|
||||
gZenUIManager.showToast('zen-background-tab-opened');
|
||||
gZenUIManager.showToast('zen-background-tab-opened-toast');
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -796,7 +796,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
let showed = false;
|
||||
if (this._initialTab) {
|
||||
if (this._initialTab._shouldRemove && this._initialTab._veryPossiblyEmpty) {
|
||||
gBrowser.removeTab(this._initialTab);
|
||||
gBrowser.removeTab(this._initialTab, {
|
||||
skipSessionStore: true,
|
||||
animate: false
|
||||
});
|
||||
} else {
|
||||
this.moveTabToWorkspace(this._initialTab, this.activeWorkspace);
|
||||
gBrowser.selectedTab = this._initialTab;
|
||||
@@ -806,12 +809,15 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
} else if (this._tabToRemoveForEmpty) {
|
||||
if (gZenVerticalTabsManager._canReplaceNewTab) {
|
||||
if (this._tabToSelect) {
|
||||
gBrowser.selectedTab = this._tabToSelect;
|
||||
gBrowser.tabbox.selectedIndex = this._tabToSelect;
|
||||
} else {
|
||||
this.selectEmptyTab();
|
||||
showed = true;
|
||||
}
|
||||
gBrowser.removeTab(this._tabToRemoveForEmpty);
|
||||
gBrowser.removeTab(this._tabToRemoveForEmpty, {
|
||||
skipSessionStore: true,
|
||||
animate: false
|
||||
});
|
||||
}
|
||||
}
|
||||
delete this._tabToSelect;
|
||||
|
||||
Reference in New Issue
Block a user