From fa2879b52370764b0adc7a03616991fce8e4f284 Mon Sep 17 00:00:00 2001 From: Comfy Org PR Bot Date: Fri, 30 Jan 2026 09:34:53 +0900 Subject: [PATCH] [backport cloud/1.38] Fix invalid keybind flash (#8452) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport of #8435 to `cloud/1.38` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8452-backport-cloud-1-38-Fix-invalid-keybind-flash-2f86d73d365081efbc2ec6ea01e37b80) by [Unito](https://www.unito.io) Co-authored-by: AustinMroz --- .../content/setting/KeybindingPanel.vue | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/components/dialog/content/setting/KeybindingPanel.vue b/src/components/dialog/content/setting/KeybindingPanel.vue index 03ca3df47c..4ef7c3e953 100644 --- a/src/components/dialog/content/setting/KeybindingPanel.vue +++ b/src/components/dialog/content/setting/KeybindingPanel.vue @@ -265,18 +265,15 @@ function cancelEdit() { } async function saveKeybinding() { - if (currentEditingCommand.value && newBindingKeyCombo.value) { - const updated = keybindingStore.updateKeybindingOnCommand( - new KeybindingImpl({ - commandId: currentEditingCommand.value.id, - combo: newBindingKeyCombo.value - }) - ) - if (updated) { - await keybindingService.persistUserKeybindings() - } - } + const commandId = currentEditingCommand.value?.id + const combo = newBindingKeyCombo.value cancelEdit() + if (!combo || commandId == undefined) return + + const updated = keybindingStore.updateKeybindingOnCommand( + new KeybindingImpl({ commandId, combo }) + ) + if (updated) await keybindingService.persistUserKeybindings() } async function resetKeybinding(commandData: ICommandData) {