fix: Make sure to disable workspace delete when updating context menus, b=no-bug, c=workspaces

This commit is contained in:
mr. m
2026-01-10 18:48:56 +01:00
parent fc7f10aef1
commit 8d25577bdb

View File

@@ -2332,6 +2332,12 @@ class nsZenWorkspaces {
updateWorkspacesChangeContextMenu() {
if (gZenWorkspaces.privateWindowOrDisabled) return;
const workspaces = this.getWorkspaces();
const ctxCommand = document.getElementById('cmd_zenCtxDeleteWorkspace');
if (workspaces.length <= 1) {
ctxCommand.setAttribute('disabled', 'true');
} else {
ctxCommand.removeAttribute('disabled');
}
let menuPopupID = 'moveTabOptionsMenu';
const menuPopup = document.getElementById(menuPopupID);