Minor Changes
- #6009
e885f88Thanks @gbalint! - AddDOMEditor.isMounted(editor)to check whether the editor has a DOM element, and use it infocusandhasDOMNode.hasDOMNodenow returnsfalsefor an editor that is not mounted, instead of throwing.
Patch Changes
-
#6139
b15d7dcThanks @dylans! - Keep the editor's selection whenDOMEditor.focusis called with a void, such as a mention, selected. The DOM selection is now applied after focusing the editable, because Chromium resets a caret placed inside non-editable content when focus arrives afterwards. -
#6136
96ceedbThanks @dylans! - Keep a forward DOM selection that ends inside a block void when converting it withtoSlateRange, instead of unhanging it to the end of the previous block. -
#6131
6c7c452Thanks @dylans! - Resolve drop positions inside shadow DOM.findEventRangepasses the editor's shadow root tocaretPositionFromPointwhere the browser supports it, instead of resolving to the shadow host and throwing "Cannot resolve a Slate point from DOM point". -
#6138
eb25ecdThanks @dylans! - Only readdata-slate-fragmentfrom an HTML attribute when pasting, so pasted text that happens to containdata-slate-fragment="…"no longer makes the paste fail.