1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-18 05:01:17 +02:00

fix: flush onDOMSelectionChange on onDOMBeforeInput (#4809)

This commit is contained in:
Eric Meier
2022-01-27 15:20:08 +01:00
committed by GitHub
parent 2a18e75c21
commit e998752989
2 changed files with 6 additions and 0 deletions

View File

@@ -330,6 +330,7 @@ export const Editable = (props: EditableProps) => {
// triggering a `beforeinput` expecting the change to be applied to the immediately before
// set selection.
scheduleOnDOMSelectionChange.flush()
onDOMSelectionChange.flush()
const { selection } = editor
const { inputType: type } = event