mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-23 07:22:55 +02:00
fix: fix onCompositionEnd update error (#5576)
* fix: fix onCompositionEnd update error * Update packages/slate-react/src/components/editable.tsx * add changeset * Update .changeset/lazy-trainers-learn.md --------- Co-authored-by: linqirong <609413692@qq.com> Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
This commit is contained in:
@@ -1114,8 +1114,10 @@ export const Editable = (props: EditableProps) => {
|
||||
(event: React.CompositionEvent<HTMLDivElement>) => {
|
||||
if (ReactEditor.hasSelectableTarget(editor, event.target)) {
|
||||
if (ReactEditor.isComposing(editor)) {
|
||||
setIsComposing(false)
|
||||
IS_COMPOSING.set(editor, false)
|
||||
Promise.resolve(() => {
|
||||
setIsComposing(false)
|
||||
IS_COMPOSING.set(editor, false)
|
||||
})
|
||||
}
|
||||
|
||||
androidInputManagerRef.current?.handleCompositionEnd(event)
|
||||
|
Reference in New Issue
Block a user