From 6d0293f0c5ce0aa229d2395c640718d913e35eb5 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com> Date: Thu, 16 Jul 2026 22:28:09 +0200 Subject: [PATCH] gh-14618: Fixed workspaces not being able to be removed (gh-14620) --- src/zen/spaces/ZenSpaceManager.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/zen/spaces/ZenSpaceManager.mjs b/src/zen/spaces/ZenSpaceManager.mjs index beae4b055..257a81318 100644 --- a/src/zen/spaces/ZenSpaceManager.mjs +++ b/src/zen/spaces/ZenSpaceManager.mjs @@ -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) {