From 775b5288fbb3c027c0a1a289d22e51f8fb713a9c Mon Sep 17 00:00:00 2001 From: mauro-balades Date: Sat, 5 Oct 2024 23:25:26 +0200 Subject: [PATCH] Fixed workspaces dialog --- src/ZenKeyboardShortcuts.mjs | 7 ++++--- src/ZenWorkspaces.mjs | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ZenKeyboardShortcuts.mjs b/src/ZenKeyboardShortcuts.mjs index eb927df..fc8821c 100644 --- a/src/ZenKeyboardShortcuts.mjs +++ b/src/ZenKeyboardShortcuts.mjs @@ -801,9 +801,10 @@ var gZenKeyboardShortcutsManager = { } key.remove(); } - if (mainKeyset.children.length > 0) { - throw new Error('Child list not empty'); - } + // We dont check this anymore since we are skiping internal keys + //if (mainKeyset.children.length > 0) { + // throw new Error('Child list not empty'); + //} for (let key of this._currentShortcutList) { if (key.isEmpty() || key.isInternal()) { diff --git a/src/ZenWorkspaces.mjs b/src/ZenWorkspaces.mjs index 026c552..b54ea7b 100644 --- a/src/ZenWorkspaces.mjs +++ b/src/ZenWorkspaces.mjs @@ -539,9 +539,9 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { let icon = document.querySelector('#PanelUI-zen-workspaces-create-icons-container [selected]'); icon?.removeAttribute('selected'); await this.createAndSaveWorkspace(workspaceName, false, icon?.label); - document.getElementById('PanelUI-zen-workspaces').hidePopup(true); await this._updateWorkspacesButton(); await this._propagateWorkspaceData(); + this.closeWorkspacesSubView(); } async saveWorkspaceFromEdit() { @@ -559,6 +559,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { workspaceData.icon = icon?.label; await this.saveWorkspace(workspaceData); await this._propagateWorkspaceData(); + this.closeWorkspacesSubView(); } onWorkspaceCreationNameChange(event) {