From 58c41719bc002092f7a1cfc3fc70ef1da67d7ce5 Mon Sep 17 00:00:00 2001 From: Luck Date: Thu, 2 Apr 2026 20:08:42 +0100 Subject: [PATCH] Don't focus editor in readonly mode --- src/components/EditorTextArea.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/EditorTextArea.tsx b/src/components/EditorTextArea.tsx index e3b64e6..8107fb2 100644 --- a/src/components/EditorTextArea.tsx +++ b/src/components/EditorTextArea.tsx @@ -124,10 +124,14 @@ export default function EditorTextArea({ resetFunctionRef.current = () => { editor.setValue(''); - editor.focus(); + if (!readOnly) { + editor.focus(); + } }; - editor.focus(); + if (!readOnly) { + editor.focus(); + } }; const onChange: OnChange = useCallback(