mirror of
https://github.com/zen-browser/desktop.git
synced 2026-03-30 04:11:51 +00:00
fix: Make sure to disable workspace delete when updating context menus, b=no-bug, c=workspaces
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user