mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 02:44:55 +00:00
Merge pull request #15052 from GitStartHQ/fix/editor-wrong-focus-checking
fix: wrong editor focus checking method
This commit is contained in:
commit
ee3f87243f
@ -43,7 +43,7 @@ const Editor = ({
|
||||
}, [editorRef, textareaRef, name, placeholder]);
|
||||
|
||||
useEffect(() => {
|
||||
if (value && !editorRef.current.state.focused) {
|
||||
if (value && !editorRef.current.hasFocus()) {
|
||||
editorRef.current.setValue(value);
|
||||
}
|
||||
}, [editorRef, value]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user