mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
fix: Fixed empty windows appearing when using the window.open JS API, b=closes #8958, c=workspaces
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index d5aa64842a35c6697263c63fd3a0571b64b01344..031b384c848fd391f84ed1e6d4f991f3287e37a4 100644
|
||||
index d5aa64842a35c6697263c63fd3a0571b64b01344..48d8465f1a4d593ec6d4bff2bd7a83f44116506b 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -413,11 +413,41 @@
|
||||
@@ -357,7 +357,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..031b384c848fd391f84ed1e6d4f991f3
|
||||
// to remove the old selected tab.
|
||||
if (tabToSelect) {
|
||||
let leftoverTab = this.selectedTab;
|
||||
+ if (this._hasAlreadyInitializedZenSessionStore) {
|
||||
+ if (this._hasAlreadyInitializedZenSessionStore || !gZenWorkspaces.workspaceEnabled) {
|
||||
this.selectedTab = tabToSelect;
|
||||
this.removeTab(leftoverTab);
|
||||
+ } else {
|
||||
|
@@ -913,7 +913,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
|
||||
async selectStartPage() {
|
||||
if (gZenUIManager.testingEnabled || !this.workspaceEnabled) {
|
||||
if (!this.workspaceEnabled) {
|
||||
return;
|
||||
}
|
||||
await this.promiseInitialized;
|
||||
@@ -1015,7 +1015,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
|
||||
handleInitialTab(tab, isEmpty) {
|
||||
if (gZenUIManager.testingEnabled) {
|
||||
if (gZenUIManager.testingEnabled || !this.workspaceEnabled) {
|
||||
return;
|
||||
}
|
||||
// note: We cant access `gZenVerticalTabsManager._canReplaceNewTab` this early
|
||||
|
Reference in New Issue
Block a user