Unverified Commit 9bcd4f59 authored by SkyWT's avatar SkyWT Committed by GitHub

fix: editor IME composing event behavior (#3267)

* fix: editor IME composing event behavior

* fix: editor IME composing event behavior

* Update web/src/components/MemoEditor/hooks/useAutoComplete.ts

---------
Co-authored-by: 's avatarboojack <stevenlgtm@gmail.com>
parent 205bf7ed
......@@ -10,6 +10,9 @@ const useAutoComplete = (actions: EditorRefActions) => {
editor.addEventListener("keydown", (event) => {
if (event.key === "Enter") {
if (event.isComposing) {
return;
}
const cursorPosition = actions.getCursorPosition();
const prevContent = actions.getContent().substring(0, cursorPosition);
const lastNode = last(window.parse(prevContent));
......
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