diff --git a/ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/TinyMCE.tsx b/ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/TinyMCE.tsx index b53db23608..cb42ca1860 100644 --- a/ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/TinyMCE.tsx +++ b/ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/TinyMCE.tsx @@ -808,6 +808,9 @@ const TinyMCE = (props:NoteBodyEditorProps, ref:any) => { editor.on('keydown', onKeyDown); editor.on('keypress', onKeypress); editor.on('paste', onPaste); + // `compositionend` means that a user has finished entering a Chinese + // (or other languages that require IME) character. + editor.on('compositionend', onChangeHandler); editor.on('cut', onChangeHandler); editor.on('joplinChange', onChangeHandler); editor.on('Undo', onChangeHandler); @@ -820,6 +823,7 @@ const TinyMCE = (props:NoteBodyEditorProps, ref:any) => { editor.off('keydown', onKeyDown); editor.off('keypress', onKeypress); editor.off('paste', onPaste); + editor.off('compositionend', onChangeHandler); editor.off('cut', onChangeHandler); editor.off('joplinChange', onChangeHandler); editor.off('Undo', onChangeHandler);