github ianstormtaylor/slate slate-react@0.131.0

latest release: slate@0.131.0
4 hours ago

Minor Changes

  • #6183 35830d7 Thanks @dylans! - initialValue on <Slate> is now optional. When it's left out, the editor's existing editor.children are used, for editors created and filled ahead of rendering. Leaving it out while editor.children is empty throws with a hint to pass initialValue={[]} if an empty editor is intended.

Patch Changes

  • #6174 ae5dc30 Thanks @dylans! - autoFocus now focuses through ReactEditor.focus, which selects the start of the document when there's no selection, so you can type right away. Before, Firefox and Safari could end up focused with no selection, especially under React strict mode.

  • #6182 835e185 Thanks @dylans! - Ignore DOM selection changes while focus is outside the editor (unless it's read-only). Firefox moves the DOM selection of a blurred editor when its content changes, so inserting text from outside the editor, such as from a toolbar button, used to jump the selection to the start.

  • #6184 7a4e15c Thanks @dylans! - Keep the caret in the editor's text when the browser moves it to a spot Slate can't represent, such as below a table that ends the document after pressing ArrowDown. Typing there used to insert the character twice: once in the last cell and once as stray text outside the table.

  • #6175 46cd8f9 Thanks @dylans! - An empty initialValue is now loaded as one empty block, so the editor has somewhere to put the cursor instead of breaking.

  • #6179 25f6353 Thanks @dylans! - Fix clicks occasionally being undone when the editor re-renders right after them. A render inside the 100 ms selection-change throttle used to write the previous selection back to the DOM; it now applies the clicked selection instead.

  • #6180 13d7c12 Thanks @dylans! - Make the void spacer unselectable (user-select: none), so a selection that includes a void element no longer shows a darker band at its edge in Chromium.

Don't miss a new slate release

NewReleases is sending notifications on new releases.