mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-27 18:24:11 +00:00
fix: skip text-editable elements in processKey
Broaden the target guard in processKey to skip all text-editable surfaces (input, textarea, contenteditable) before handling shortcuts. This prevents space/Ctrl+A/C from being blocked when typing in prompt textareas or other multiline fields in Vue nodes mode.
This commit is contained in:
@@ -3716,8 +3716,13 @@ export class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasEventMap>
|
||||
if (!graph) return
|
||||
|
||||
let block_default = false
|
||||
// @ts-expect-error EventTarget.localName is not in standard types
|
||||
if (e.target.localName == 'input') return
|
||||
// Skip all text-editable surfaces to avoid blocking typing/selection/copy
|
||||
const target = e.target as HTMLElement | null
|
||||
if (
|
||||
target?.localName === 'input' ||
|
||||
target?.localName === 'textarea' ||
|
||||
target?.isContentEditable
|
||||
) return
|
||||
|
||||
if (e.type == 'keydown') {
|
||||
// TODO: Switch
|
||||
|
||||
Reference in New Issue
Block a user