Skip to content

Commit 8e799a6

Browse files
committed
fix: Fixed empty windows appearing when using the window.open JS API, b=closes #8958, c=workspaces
1 parent a3f1733 commit 8e799a6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/browser/components/tabbrowser/content/tabbrowser-js.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
2-
index d5aa64842a35c6697263c63fd3a0571b64b01344..031b384c848fd391f84ed1e6d4f991f3287e37a4 100644
2+
index d5aa64842a35c6697263c63fd3a0571b64b01344..48d8465f1a4d593ec6d4bff2bd7a83f44116506b 100644
33
--- a/browser/components/tabbrowser/content/tabbrowser.js
44
+++ b/browser/components/tabbrowser/content/tabbrowser.js
55
@@ -413,11 +413,41 @@
@@ -357,7 +357,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..031b384c848fd391f84ed1e6d4f991f3
357357
// to remove the old selected tab.
358358
if (tabToSelect) {
359359
let leftoverTab = this.selectedTab;
360-
+ if (this._hasAlreadyInitializedZenSessionStore) {
360+
+ if (this._hasAlreadyInitializedZenSessionStore || !gZenWorkspaces.workspaceEnabled) {
361361
this.selectedTab = tabToSelect;
362362
this.removeTab(leftoverTab);
363363
+ } else {

src/zen/workspaces/ZenWorkspaces.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
913913
}
914914

915915
async selectStartPage() {
916-
if (gZenUIManager.testingEnabled || !this.workspaceEnabled) {
916+
if (!this.workspaceEnabled) {
917917
return;
918918
}
919919
await this.promiseInitialized;
@@ -1015,7 +1015,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
10151015
}
10161016

10171017
handleInitialTab(tab, isEmpty) {
1018-
if (gZenUIManager.testingEnabled) {
1018+
if (gZenUIManager.testingEnabled || !this.workspaceEnabled) {
10191019
return;
10201020
}
10211021
// note: We cant access `gZenVerticalTabsManager._canReplaceNewTab` this early

0 commit comments

Comments
 (0)