1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-07-31 20:40:19 +02:00

fix: supplement of (fix: Prevent ReactEditor.toDOMRange crash in setDomSelection #5741) (#5792)

* fix: supplement of (fix: Prevent ReactEditor.toDOMRange crash in setDomSelection #5741)

* Update packages/slate-dom/src/plugin/with-dom.ts

* Update packages/slate-dom/src/plugin/with-dom.ts

* Create gold-tomatoes-grab.md

* Update packages/slate-dom/src/plugin/with-dom.ts

* Update packages/slate-dom/src/plugin/with-dom.ts

---------

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
This commit is contained in:
zhi-zhi-zhi
2025-01-27 22:05:42 +08:00
committed by GitHub
parent 49da0dfc53
commit 8216512595
2 changed files with 11 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
'slate-dom': patch
---
fix: additional fix for previous fix: Prevent ReactEditor.toDOMRange crash in setDomSelection #5741

View File

@@ -210,7 +210,12 @@ export const withDOM = <T extends BaseEditor>(
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)
}
}