1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-24 09:13:24 +01:00

fix: IME repeat input (#3768)

This commit is contained in:
gyh9457 2021-04-01 04:00:37 +08:00 committed by GitHub
parent efce5373fd
commit 459e826d58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -521,9 +521,11 @@ export const Editable = (props: EditableProps) => {
hasEditableTarget(editor, event.target)
) {
event.preventDefault()
if (!state.isComposing) {
const text = (event as any).data as string
Editor.insertText(editor, text)
}
}
},
[readOnly]
)}