1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-19 13:41:19 +02:00

Fix onCompositionEnd not updating isComposing (#5584)

* fix: onCompositionEnd not updating isComposing

* Add changeset
This commit is contained in:
Elvin
2023-12-22 06:46:14 +08:00
committed by GitHub
parent 8ba3a9c034
commit 884ab42494
2 changed files with 6 additions and 1 deletions

View File

@@ -1114,7 +1114,7 @@ export const Editable = (props: EditableProps) => {
(event: React.CompositionEvent<HTMLDivElement>) => {
if (ReactEditor.hasSelectableTarget(editor, event.target)) {
if (ReactEditor.isComposing(editor)) {
Promise.resolve(() => {
Promise.resolve().then(() => {
setIsComposing(false)
IS_COMPOSING.set(editor, false)
})