mirror of https://github.com/usememos/memos.git
fix: editor IME composing event behavior
This commit is contained in:
parent
761b4e115b
commit
4bbb63d09a
|
|
@ -10,6 +10,10 @@ const useAutoComplete = (actions: EditorRefActions) => {
|
|||
|
||||
editor.addEventListener("keydown", (event) => {
|
||||
if (event.key === "Enter") {
|
||||
if (event.nativeEvent.isComposing) {
|
||||
return;
|
||||
}
|
||||
|
||||
const cursorPosition = actions.getCursorPosition();
|
||||
const prevContent = actions.getContent().substring(0, cursorPosition);
|
||||
const lastNode = last(window.parse(prevContent));
|
||||
|
|
|
|||
Loading…
Reference in New Issue