github ianstormtaylor/slate slate-dom@0.129.0

3 hours ago

Minor Changes

  • #6009 e885f88 Thanks @gbalint! - Add DOMEditor.isMounted(editor) to check whether the editor has a DOM element, and use it in focus and hasDOMNode. hasDOMNode now returns false for an editor that is not mounted, instead of throwing.

Patch Changes

  • #6139 b15d7dc Thanks @dylans! - Keep the editor's selection when DOMEditor.focus is 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 96ceedb Thanks @dylans! - Keep a forward DOM selection that ends inside a block void when converting it with toSlateRange, instead of unhanging it to the end of the previous block.

  • #6131 6c7c452 Thanks @dylans! - Resolve drop positions inside shadow DOM. findEventRange passes the editor's shadow root to caretPositionFromPoint where the browser supports it, instead of resolving to the shadow host and throwing "Cannot resolve a Slate point from DOM point".

  • #6138 eb25ecd Thanks @dylans! - Only read data-slate-fragment from an HTML attribute when pasting, so pasted text that happens to contain data-slate-fragment="…" no longer makes the paste fail.

Don't miss a new slate release

NewReleases is sending notifications on new releases.