From 57b68599e9229526b8643b6d26a7bbea3a1ef5f5 Mon Sep 17 00:00:00 2001 From: mauro-balades Date: Tue, 24 Sep 2024 21:30:28 +0200 Subject: [PATCH] Refactor ZenKeyboardShortcuts to fix target shortcut identification --- src/ZenKeyboardShortcuts.mjs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ZenKeyboardShortcuts.mjs b/src/ZenKeyboardShortcuts.mjs index fed31c3..0cee189 100644 --- a/src/ZenKeyboardShortcuts.mjs +++ b/src/ZenKeyboardShortcuts.mjs @@ -823,7 +823,7 @@ var gZenKeyboardShortcutsManager = { // Unsetting shortcut for (let targetShortcut of this._currentShortcutList) { - if (targetShortcut.getAction() != action) { + if (targetShortcut.getID() != action) { continue; } if (!shortcut && !modifiers) { @@ -854,10 +854,9 @@ var gZenKeyboardShortcutsManager = { return rv; }, - checkForConflicts(shortcut, modifiers, id, action) { + checkForConflicts(shortcut, modifiers, id) { for (let targetShortcut of this._currentShortcutList) { - if ((targetShortcut.getID() == id) - || (action == targetShortcut.getAction())) { + if (targetShortcut.getID() == id) { continue; }