Skip to content

slate-react@0.126.0

Choose a tag to compare

@dylans dylans released this 07 Aug 15:55
2b7d9b0

Minor Changes

  • #6073 6fa9a129 Thanks @NikunjSonigara! - Add a suppressThrow option to useSelected to return false instead of throwing when the element can no longer be found in the editor.

Patch Changes

  • #6080 9265c408 Thanks @isachivka! - Suppress the findPath throw when translating beforeinput target ranges in <Editable> (#3556). A browser target range can point at a DOM node no longer resolvable to a Slate node (stale NODE_MAP after a re-render, IME composition, cross-editor click); with suppressThrow: false the "Unable to find the path" error escaped the DOM event handler and crashed the app. The two onDOMBeforeInput call sites now use suppressThrow: true (matching the other toSlateRange sites) and degrade gracefully — fall back to synthetic handling, or skip the selection move.