diff --git a/.changeset/sour-nails-double.md b/.changeset/sour-nails-double.md new file mode 100644 index 000000000..bfceac36e --- /dev/null +++ b/.changeset/sour-nails-double.md @@ -0,0 +1,5 @@ +--- +'slate-react': patch +--- + +Fixed a bug where text was typed backwards within nested editor diff --git a/packages/slate-react/src/components/editable.tsx b/packages/slate-react/src/components/editable.tsx index 4bece19a1..872bec892 100644 --- a/packages/slate-react/src/components/editable.tsx +++ b/packages/slate-react/src/components/editable.tsx @@ -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