mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-20 06:01:24 +02:00
Fix onCompositionEnd not updating isComposing (#5584)
* fix: onCompositionEnd not updating isComposing * Add changeset
This commit is contained in:
5
.changeset/light-bulldogs-refuse.md
Normal file
5
.changeset/light-bulldogs-refuse.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'slate-react': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix onCompositionEnd not updating isComposing
|
@@ -1114,7 +1114,7 @@ export const Editable = (props: EditableProps) => {
|
|||||||
(event: React.CompositionEvent<HTMLDivElement>) => {
|
(event: React.CompositionEvent<HTMLDivElement>) => {
|
||||||
if (ReactEditor.hasSelectableTarget(editor, event.target)) {
|
if (ReactEditor.hasSelectableTarget(editor, event.target)) {
|
||||||
if (ReactEditor.isComposing(editor)) {
|
if (ReactEditor.isComposing(editor)) {
|
||||||
Promise.resolve(() => {
|
Promise.resolve().then(() => {
|
||||||
setIsComposing(false)
|
setIsComposing(false)
|
||||||
IS_COMPOSING.set(editor, false)
|
IS_COMPOSING.set(editor, false)
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user