diff --git a/.changeset/gold-tomatoes-grab.md b/.changeset/gold-tomatoes-grab.md new file mode 100644 index 0000000000..0707d2e68a --- /dev/null +++ b/.changeset/gold-tomatoes-grab.md @@ -0,0 +1,5 @@ +--- +'slate-dom': patch +--- + +fix: additional fix for previous fix: Prevent ReactEditor.toDOMRange crash in setDomSelection #5741 diff --git a/packages/slate-dom/src/plugin/with-dom.ts b/packages/slate-dom/src/plugin/with-dom.ts index bf6efb7409..474ed12fac 100644 --- a/packages/slate-dom/src/plugin/with-dom.ts +++ b/packages/slate-dom/src/plugin/with-dom.ts @@ -210,7 +210,12 @@ export const withDOM = ( case 'remove_node': case 'merge_node': case 'move_node': - case 'split_node': { + case 'split_node': + case 'insert_text': + case 'remove_text': + case 'set_selection': { + // FIXME: Rename to something like IS_DOM_EDITOR_DESYNCED + // to better reflect reality, see #5792 IS_NODE_MAP_DIRTY.set(e, true) } }