@@ -478,7 +478,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
478
478
return this . getEssentialsSection ( currentWorkspace ?. containerTabId ) ;
479
479
}
480
480
481
- async _createWorkspaceTabsSection ( workspace , tabs ) {
481
+ async _createWorkspaceTabsSection ( workspace , tabs = [ ] ) {
482
482
const workspaceWrapper = document . createXULElement ( 'zen-workspace' ) ;
483
483
const container = document . getElementById ( 'tabbrowser-arrowscrollbox' ) ;
484
484
workspaceWrapper . id = workspace . uuid ;
@@ -1354,6 +1354,12 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
1354
1354
detail : { activeIndex : browser . gZenWorkspaces . activeWorkspace } ,
1355
1355
} )
1356
1356
) ;
1357
+ for ( const workspace of workspaces . workspaces ) {
1358
+ // Add workspace elements if they dont exist on other windows
1359
+ if ( ! browser . gZenWorkspaces . workspaceElement ( workspace . uuid ) ) {
1360
+ await browser . gZenWorkspaces . _createWorkspaceTabsSection ( workspace ) ;
1361
+ }
1362
+ }
1357
1363
}
1358
1364
await browser . gZenWorkspaces . workspaceBookmarks ( ) ;
1359
1365
if ( ! ignoreStrip ) {
@@ -1499,7 +1505,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
1499
1505
return true ;
1500
1506
}
1501
1507
1502
- _prepareNewWorkspace ( window ) {
1508
+ #prepareNewWorkspace ( window ) {
1503
1509
document . documentElement . setAttribute ( 'zen-workspace-id' , window . uuid ) ;
1504
1510
let tabCount = 0 ;
1505
1511
for ( let tab of gBrowser . tabs ) {
@@ -2320,7 +2326,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
2320
2326
containerTabId,
2321
2327
} ;
2322
2328
if ( moveTabs ) {
2323
- this . _prepareNewWorkspace ( workspace ) ;
2329
+ this . #prepareNewWorkspace ( workspace ) ;
2324
2330
await this . _createWorkspaceTabsSection ( workspace , tabs ) ;
2325
2331
await this . _organizeWorkspaceStripLocations ( workspace ) ;
2326
2332
}
0 commit comments