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:
Johnpaul
2026-01-06 20:14:58 +01:00
parent 0e47f9fb10
commit a47081c169

View File

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