Unverified Commit 6ff79c5d authored by Stephen Zhou's avatar Stephen Zhou Committed by GitHub

fix: can not input chinese (#1053)

parent 168c4f69
...@@ -173,6 +173,8 @@ const MemoEditor = () => { ...@@ -173,6 +173,8 @@ const MemoEditor = () => {
} }
} }
} }
editorRef.current?.scrollToCursor();
} }
} }
return; return;
...@@ -483,10 +485,7 @@ const MemoEditor = () => { ...@@ -483,10 +485,7 @@ const MemoEditor = () => {
<div <div
className={`memo-editor-container ${isEditing ? "edit-ing" : ""} ${state.fullscreen ? "fullscreen" : ""}`} className={`memo-editor-container ${isEditing ? "edit-ing" : ""} ${state.fullscreen ? "fullscreen" : ""}`}
tabIndex={0} tabIndex={0}
onKeyDown={(e) => { onKeyDown={handleKeyDown}
handleKeyDown(e);
editorRef.current?.scrollToCursor();
}}
onDrop={handleDropEvent} onDrop={handleDropEvent}
onFocus={handleEditorFocus} onFocus={handleEditorFocus}
onBlur={handleEditorBlur} onBlur={handleEditorBlur}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment