File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1167,7 +1167,8 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
11671167 } else {
11681168 openInContainerMenuItem . setAttribute ( 'hidden' , 'true' ) ;
11691169 }
1170- const target = event . explicitOriginalTarget ?. closest ( 'toolbarbutton' ) ;
1170+ // Call parent node as on windows, the text can be double clicked
1171+ const target = event . explicitOriginalTarget ?. parentNode ?. closest ( 'toolbarbutton' ) ;
11711172 this . #contextMenuData = {
11721173 workspaceId : target ?. getAttribute ( 'zen-workspace-id' ) ,
11731174 originalTarget : target ,
@@ -1191,7 +1192,11 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
11911192 item . className = 'zen-workspace-context-menu-item' ;
11921193 item . setAttribute ( 'zen-workspace-id' , workspace . uuid ) ;
11931194 item . setAttribute ( 'disabled' , workspace . uuid === this . activeWorkspace ) ;
1194- item . setAttribute ( 'label' , ( workspace . icon ?? ' \u25CB ' ) + ' ' + workspace . name ) ;
1195+ let name = workspace . name ;
1196+ if ( workspace . icon && workspace . icon !== '' ) {
1197+ name = `${ workspace . icon } ${ name } ` ;
1198+ }
1199+ item . setAttribute ( 'label' , name ) ;
11951200 item . addEventListener ( 'command' , ( e ) => {
11961201 this . changeWorkspaceWithID ( e . target . closest ( 'menuitem' ) . getAttribute ( 'zen-workspace-id' ) ) ;
11971202 } ) ;
You can’t perform that action at this time.
0 commit comments