mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 19:21:54 +00:00
[backport cloud/1.38] Fix invalid keybind flash (#8452)
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 <austin@comfy.org>
This commit is contained in:
@@ -265,18 +265,15 @@ function cancelEdit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function saveKeybinding() {
|
async function saveKeybinding() {
|
||||||
if (currentEditingCommand.value && newBindingKeyCombo.value) {
|
const commandId = currentEditingCommand.value?.id
|
||||||
const updated = keybindingStore.updateKeybindingOnCommand(
|
const combo = newBindingKeyCombo.value
|
||||||
new KeybindingImpl({
|
|
||||||
commandId: currentEditingCommand.value.id,
|
|
||||||
combo: newBindingKeyCombo.value
|
|
||||||
})
|
|
||||||
)
|
|
||||||
if (updated) {
|
|
||||||
await keybindingService.persistUserKeybindings()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cancelEdit()
|
cancelEdit()
|
||||||
|
if (!combo || commandId == undefined) return
|
||||||
|
|
||||||
|
const updated = keybindingStore.updateKeybindingOnCommand(
|
||||||
|
new KeybindingImpl({ commandId, combo })
|
||||||
|
)
|
||||||
|
if (updated) await keybindingService.persistUserKeybindings()
|
||||||
}
|
}
|
||||||
|
|
||||||
async function resetKeybinding(commandData: ICommandData) {
|
async function resetKeybinding(commandData: ICommandData) {
|
||||||
|
|||||||
Reference in New Issue
Block a user