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(