mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-20 22:21:20 +02:00
fix: flush onDOMSelectionChange on onDOMBeforeInput (#4809)
This commit is contained in:
5
.changeset/wise-kings-serve.md
Normal file
5
.changeset/wise-kings-serve.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'slate-react': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Flush onDOMSelectionChange on onDOMBeforeInput
|
@@ -330,6 +330,7 @@ export const Editable = (props: EditableProps) => {
|
|||||||
// triggering a `beforeinput` expecting the change to be applied to the immediately before
|
// triggering a `beforeinput` expecting the change to be applied to the immediately before
|
||||||
// set selection.
|
// set selection.
|
||||||
scheduleOnDOMSelectionChange.flush()
|
scheduleOnDOMSelectionChange.flush()
|
||||||
|
onDOMSelectionChange.flush()
|
||||||
|
|
||||||
const { selection } = editor
|
const { selection } = editor
|
||||||
const { inputType: type } = event
|
const { inputType: type } = event
|
||||||
|
Reference in New Issue
Block a user