mirror of
https://github.com/zen-browser/desktop.git
synced 2026-07-17 22:21:04 +00:00
gh-14618: Fixed workspaces not being able to be removed (gh-14620)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user