From a47081c169cf7c9289baf8a8248a70f29ef1e29e Mon Sep 17 00:00:00 2001 From: Johnpaul Date: Tue, 6 Jan 2026 20:14:58 +0100 Subject: [PATCH] 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. --- src/lib/litegraph/src/LGraphCanvas.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/litegraph/src/LGraphCanvas.ts b/src/lib/litegraph/src/LGraphCanvas.ts index 81fc1b3f47..943a01d9c6 100644 --- a/src/lib/litegraph/src/LGraphCanvas.ts +++ b/src/lib/litegraph/src/LGraphCanvas.ts @@ -3716,8 +3716,13 @@ export class LGraphCanvas implements CustomEventDispatcher 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