From 215e1e98314f9b6579d3513f6d43dfe50f637ecf Mon Sep 17 00:00:00 2001 From: Adam Gough Date: Sat, 31 May 2025 20:10:00 -0700 Subject: [PATCH] fix: Shift+L command to work when not in subBlock --- apps/sim/app/w/[id]/workflow.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/sim/app/w/[id]/workflow.tsx b/apps/sim/app/w/[id]/workflow.tsx index 20d51569cd..c0684ded3b 100644 --- a/apps/sim/app/w/[id]/workflow.tsx +++ b/apps/sim/app/w/[id]/workflow.tsx @@ -203,6 +203,17 @@ function WorkflowContent() { const handleKeyDown = (event: KeyboardEvent) => { if (event.shiftKey && event.key === 'L' && !event.ctrlKey && !event.metaKey) { + // Don't trigger if user is typing in an input, textarea, or contenteditable element + const activeElement = document.activeElement + const isEditableElement = + activeElement instanceof HTMLInputElement || + activeElement instanceof HTMLTextAreaElement || + activeElement?.hasAttribute('contenteditable') + + if (isEditableElement) { + return // Allow normal typing behavior + } + event.preventDefault() if (cleanup) cleanup()