Skip to content

Commit 153b5f8

Browse files
authored
Merge branch 'dev' into add-air-traffic-control
2 parents 014fb64 + ab2a982 commit 153b5f8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/zen/workspaces/ZenWorkspaces.mjs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff 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
});

0 commit comments

Comments
 (0)