Don't focus editor in readonly mode
This commit is contained in:
@@ -124,10 +124,14 @@ export default function EditorTextArea({
|
|||||||
|
|
||||||
resetFunctionRef.current = () => {
|
resetFunctionRef.current = () => {
|
||||||
editor.setValue('');
|
editor.setValue('');
|
||||||
|
if (!readOnly) {
|
||||||
editor.focus();
|
editor.focus();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!readOnly) {
|
||||||
editor.focus();
|
editor.focus();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const onChange: OnChange = useCallback(
|
const onChange: OnChange = useCallback(
|
||||||
|
|||||||
Reference in New Issue
Block a user