Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: can not input chinese (#1053)

Stephen Zhou6ff79c5d5c49
diff --git a/web/src/components/MemoEditor.tsx b/web/src/components/MemoEditor.tsx
index b8b02fe9f..3e00847e1 100644
--- a/web/src/components/MemoEditor.tsx
+++ b/web/src/components/MemoEditor.tsx
@@ -173,6 +173,8 @@ const MemoEditor = () => {
}
}
}
+
+ editorRef.current?.scrollToCursor();
}
}
return;
@@ -483,10 +485,7 @@ const MemoEditor = () => {
<div
className={`memo-editor-container ${isEditing ? "edit-ing" : ""} ${state.fullscreen ? "fullscreen" : ""}`}
tabIndex={0}
- onKeyDown={(e) => {
- handleKeyDown(e);
- editorRef.current?.scrollToCursor();
- }}
+ onKeyDown={handleKeyDown}
onDrop={handleDropEvent}
onFocus={handleEditorFocus}
onBlur={handleEditorBlur}