fix: Fixed invalid targets being used on workspace labels, b=no-bug, c=tabs, workspaces

This commit is contained in:
mr. m
2025-06-16 19:44:14 +02:00
parent bf95bc7078
commit dcd032856b
2 changed files with 5 additions and 4 deletions

View File

@@ -798,14 +798,12 @@
}
}
/* Center top buttons container */
& #zen-sidebar-top-buttons {
justify-content: center;
max-height: unset !important; /* Allow natural height */
max-height: unset !important;
height: fit-content !important;
}
/* Adjust titlebar layout for collapsed state */
& #titlebar {
display: grid;
grid-template-rows: auto 1fr; /* Allow content below button box */

View File

@@ -1170,7 +1170,10 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
openInContainerMenuItem.setAttribute('hidden', 'true');
}
// Call parent node as on windows, the text can be double clicked
const target = event.explicitOriginalTarget?.parentNode?.closest('toolbarbutton');
let target;
try {
target = event.explicitOriginalTarget?.closest('toolbarbutton');
} catch (_) {}
this.#contextMenuData = {
workspaceId: target?.getAttribute('zen-workspace-id'),
originalTarget: target,