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 mr. m
parent 59b199612e
commit 6d0293f0c5

View File

@@ -2396,7 +2396,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");
@@ -2416,6 +2417,9 @@ class nsZenWorkspaces {
)) {
item.remove();
}
if (!hasMultipleWorkspaces) {
continue;
}
const separator = document.createXULElement("menuseparator");
separator.classList.add("zen-workspace-context-menu-item");
if (isMoveTabPopup) {