mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-18 13:11:17 +02:00
Fix invalid cursor when IME converting (#4450)
This commit is contained in:
committed by
GitHub
parent
0025900349
commit
220f2d2ce6
5
.changeset/fix-ime-cursor-position.md
Normal file
5
.changeset/fix-ime-cursor-position.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'slate-react': patch
|
||||
---
|
||||
|
||||
Changed so that the onKeyDown event do not fired while IME converting.
|
@@ -912,6 +912,7 @@ export const Editable = (props: EditableProps) => {
|
||||
(event: React.KeyboardEvent<HTMLDivElement>) => {
|
||||
if (
|
||||
!readOnly &&
|
||||
!state.isComposing &&
|
||||
hasEditableTarget(editor, event.target) &&
|
||||
!isEventHandled(event, attributes.onKeyDown)
|
||||
) {
|
||||
|
Reference in New Issue
Block a user