mirror of
https://github.com/zen-browser/desktop.git
synced 2026-04-02 05:39:18 +00:00
fix: Fixed restoring previous tab on other workspaces, b=(no-bug), c=compact-mode, workspaces
This commit is contained in:
@@ -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