From f1660a533146c420253df6e2dec0e0d4a2a9ebf4 Mon Sep 17 00:00:00 2001 From: LangLangBart <92653266+LangLangBart@users.noreply.github.com> Date: Fri, 29 Dec 2023 01:50:44 +0100 Subject: [PATCH] fix: editor focus handling on click events (#716) --- gui/src/components/mainInput/TipTapEditor.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index bc1253d3c..cce48c537 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -340,7 +340,12 @@ function TipTapEditor(props: TipTapEditorProps) { }, [editor, props.isMainInput, historyLength, ignoreHighlightedCode]); return ( - + { + editor && editor.commands.focus(); + }} + > { @@ -352,6 +357,9 @@ function TipTapEditor(props: TipTapEditorProps) { setInputFocused(false); }, 100); }} + onClick={(event) => { + event.stopPropagation(); + }} /> );