From 71e81fefd4db322993ae0a3550402fb1c05f42b2 Mon Sep 17 00:00:00 2001 From: dtoro Date: Fri, 6 Mar 2026 21:42:03 +0100 Subject: [PATCH] fix monaco --- src/components/graph/ConfigNode.tsx | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/components/graph/ConfigNode.tsx b/src/components/graph/ConfigNode.tsx index 8f6cdd4..534d710 100644 --- a/src/components/graph/ConfigNode.tsx +++ b/src/components/graph/ConfigNode.tsx @@ -68,6 +68,22 @@ export const ConfigNode = memo(function ConfigNode({ id, data }: Props) { const handleEditorMount = useCallback((editor: any, monaco: any) => { editorRef.current = editor monacoRef.current = monaco + + // Prevent React Flow and other global handlers from interfering with typing + try { + editor.onKeyDown((e: any) => { + if (e?.browserEvent) { + e.browserEvent.stopPropagation() + } + }) + editor.onMouseDown((e: any) => { + if (e?.event) { + e.event.stopPropagation() + } + }) + } catch { + // ignore if Monaco internals change + } }, []) const insertIncludeFromNode = useCallback( @@ -162,7 +178,7 @@ export const ConfigNode = memo(function ConfigNode({ id, data }: Props) { )} -
+