mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-16 20:24:01 +02:00
Do NOT use exact match when updating dom selection (#4304)
* Do NOT use exact match when updating dom selection * Added changeset
This commit is contained in:
5
.changeset/sour-nails-double.md
Normal file
5
.changeset/sour-nails-double.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'slate-react': patch
|
||||
---
|
||||
|
||||
Fixed a bug where text was typed backwards within nested editor
|
@@ -182,7 +182,7 @@ export const Editable = (props: EditableProps) => {
|
||||
// If the DOM selection is in the editor and the editor selection is already correct, we're done.
|
||||
if (hasDomSelection && hasDomSelectionInEditor && selection) {
|
||||
const slateRange = ReactEditor.toSlateRange(editor, domSelection, {
|
||||
exactMatch: true,
|
||||
exactMatch: false,
|
||||
})
|
||||
if (slateRange && Range.equals(slateRange, selection)) {
|
||||
return
|
||||
|
Reference in New Issue
Block a user