From 2655967e773636a6894514dac4e925c52f4017aa Mon Sep 17 00:00:00 2001 From: Jonas Helming Date: Mon, 23 Dec 2024 20:47:06 +0100 Subject: [PATCH] Fix override of default key bindings fixed #14667 --- packages/core/src/browser/keybinding.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/src/browser/keybinding.ts b/packages/core/src/browser/keybinding.ts index 6871f5381ba62..e9dd2a133384e 100644 --- a/packages/core/src/browser/keybinding.ts +++ b/packages/core/src/browser/keybinding.ts @@ -622,15 +622,15 @@ export class KeybindingRegistry { matchKeybinding(keySequence: KeySequence, event?: KeyboardEvent): KeybindingRegistry.Match { let disabled: Set | undefined; const isEnabled = (binding: ScopedKeybinding) => { - if (event && !this.isEnabled(binding, event)) { - return false; - } const { command, context, when, keybinding } = binding; if (!this.isUsable(binding)) { disabled = disabled || new Set(); disabled.add(JSON.stringify({ command: command.substring(1), context, when, keybinding })); return false; } + if (event && !this.isEnabled(binding, event)) { + return false; + } return !disabled?.has(JSON.stringify({ command, context, when, keybinding })); };