From 3d303c7693d810a5cbd2aaa2fee19e9a3c385eb4 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Wed, 6 Nov 2024 13:46:56 -0500 Subject: [PATCH] Fix save workflow binding on Ctrl + S (#1442) * Fix save workflow binding on Ctrl + S * nit --- src/extensions/core/keybinds.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/extensions/core/keybinds.ts b/src/extensions/core/keybinds.ts index 736cf64bd..e7bdf7548 100644 --- a/src/extensions/core/keybinds.ts +++ b/src/extensions/core/keybinds.ts @@ -31,8 +31,9 @@ app.registerExtension({ const commandStore = useCommandStore() const keybinding = keybindingStore.getKeybinding(keyCombo) if (keybinding && keybinding.targetSelector !== '#graph-canvas') { - await commandStore.execute(keybinding.commandId) + // Prevent default browser behavior first, then execute the command event.preventDefault() + await commandStore.execute(keybinding.commandId) return }