Fix save workflow binding on Ctrl + S (#1442)

* Fix save workflow binding on Ctrl + S

* nit
This commit is contained in:
Chenlei Hu
2024-11-06 13:46:56 -05:00
committed by GitHub
parent 9f14edaf2b
commit 3d303c7693

View File

@@ -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
}