mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-23 07:22:55 +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>) => {
|
(event: React.KeyboardEvent<HTMLDivElement>) => {
|
||||||
if (
|
if (
|
||||||
!readOnly &&
|
!readOnly &&
|
||||||
|
!state.isComposing &&
|
||||||
hasEditableTarget(editor, event.target) &&
|
hasEditableTarget(editor, event.target) &&
|
||||||
!isEventHandled(event, attributes.onKeyDown)
|
!isEventHandled(event, attributes.onKeyDown)
|
||||||
) {
|
) {
|
||||||
|
Reference in New Issue
Block a user