gh-14618: Fixed workspaces not being able to be removed (gh-14620)

This commit is contained in:
mr. m
2026-07-16 22:28:09 +02:00
committed by GitHub
parent 425f0ae1c3
commit 247cde9c09

View File

@@ -2486,7 +2486,8 @@ class nsZenWorkspaces {
w => w.uuid !== this.activeWorkspace
);
const ctxCommand = document.getElementById("cmd_zenCtxDeleteWorkspace");
if (workspaces.length <= 1) {
const hasMultipleWorkspaces = !!workspaces.length;
if (!hasMultipleWorkspaces) {
ctxCommand.setAttribute("disabled", "true");
} else {
ctxCommand.removeAttribute("disabled");
@@ -2506,6 +2507,9 @@ class nsZenWorkspaces {
)) {
item.remove();
}
if (!hasMultipleWorkspaces) {
continue;
}
const separator = document.createXULElement("menuseparator");
separator.classList.add("zen-workspace-context-menu-item");
if (isMoveTabPopup) {