Releases: ianstormtaylor/slate
[email protected]
Minor Changes
Patch Changes
-
#4475
c1433f56
Thanks @skogsmaskin! - [slate-react]: fix selection bugs when multiple editors share value -
#4132
48b71294
Thanks @ulion! - Make onDomSelectionChange trigger after onClick. -
#4493
3dd74dd5
Thanks @dylans! - Update error message for useSlate -
#4450
220f2d2c
Thanks @neko-neko! - Changed so that the onKeyDown event do not fired while IME converting. -
#4452
935b3a79
Thanks @dylans! - double ime fix for qq browser -
#4500
50bb3d7e
Thanks @tubbo! - Upgradeis-plain-object
to v5.0.0 -
#4480
e51566ad
Thanks @imdbsd! - Add key for Children SelectedContext.Provider -
#4454
d06706c9
Thanks @imdbsd! - Fix to read fragment from data-slate-fragment when application/x-slate-fragment is missing -
#4460
ace397f9
Thanks @dylans! - fix double character insertion regression due to unnecessary memo -
#4451
8e4120ae
Thanks @githoniel! - fix IME double input with editor mark -
#4503
2065c5bd
Thanks @bytrangle! - Fix incorrect selection when triple clicking blocks in Editable component -
#4433
a1f925bd
Thanks @imdbsd! - Fix copy-paste a slate fragment on android editable -
#4365
906e5af1
Thanks @samarsault! - fix a bug where element selections were not captured by useSelected -
#4342
834ce348
Thanks @imdbsd! - Fix editor mark is not inserted on android
[email protected]
[email protected]
[email protected]
Patch Changes
-
#4253
0214b630
Thanks @TheSpyder! - FixTransforms.wrapNodes
crashing when thematch
function matched only the editor -
#4049
6c844227
Thanks @ulion! - Fix ios chrome ime double input issue. -
#4421
237edc6e
Thanks @jaked! - fix decorate bug (#4277) without adding extra layers of render tree -
#4349
236754c4
Thanks @imdbsd! - Add isElementType utility to Element interface
[email protected]
Patch Changes
-
#4175
bde6e804
Thanks @gyh9457! - Fixed a bug in the memoization logic for the leaves of text nodes. -
#4394
01889807
Thanks @jaked! - fix bug where decorate is not called on immediate children of editor -
#4049
6c844227
Thanks @ulion! - Fix ios chrome ime double input issue. -
#4427
3f69a9f3
Thanks @ben10code! - Fix crash when unmounting an editor rendered within a React portal. The issue was arising at unmount time, becausegetRootNode
returned the dettached portal node and it is not an instance ofDocument
orShadowRoot
. As a fix,getDocumentOrShadowRoot
has been refactored to return a root node instead of throwing. In sum, this patch fixes a regression bug introduced by #3749 -
#4369
c217dbb5
Thanks @thesunny! - Scroll when inserting new text will now scroll parent scrollables -
#4333
e0776c5c
Thanks @dylans! - Allow setFragmentData to work without copy/paste or DnD data structure -
#4421
237edc6e
Thanks @jaked! - fix decorate bug (#4277) without adding extra layers of render tree -
#4347
46c8871c
Thanks @aiwenar! - Re-render leaf when new properties were added to it -
#4352
4b373dc2
Thanks @hueyhe! - Do not display placeholder when composing
[email protected]
Patch Changes
- #4430
748bf750
Thanks @TheSpyder! - Removed unnecessary (and outdated) dependency onimmer
[email protected]
Patch Changes
- #4331
a3bc97af
Thanks @golota60! - Fix deletion of selected inline void nodes in Safari when presssingbackspace
ordelete
. This is a bug that was originally fixed only for Google Chrome, but the fix also needs to be applied in Safari.
[email protected]
Patch Changes
- #4324
61171a23
Thanks @clauderic! - Fix backward typing bug in Safari by ensuring the selection is always removed on blur.
Safari doesn't always remove the selection, even if the contenteditable element no longer has focus.
In this scenario, we need to forcefully remove the selection on blur.
Refer to https://stackoverflow.com/questions/12353247/force-contenteditable-div-to-stop-accepting-input-after-it-loses-focus-under-web
[email protected]
Minor Changes
-
#4299
2c17e2b7
Thanks @georgberecz! - Allow custom event handlers on Editable component to return boolean flag to specify whether the event can be treated as being handled.By default, the
Editable
component comes with a set of event handlers that handle typical rich-text editing behaviors (for example, it implements its ownonCopy
,onPaste
,onDrop
, andonKeyDown
handlers).In some cases you may want to extend or override Slate's default behavior, which can be done by passing your own event handler(s) to the
Editable
component.Your custom event handler can control whether or not Slate should execute its own event handling for a given event after your handler runs depending on the return value of your event handler as described below.
import {Editable} from 'slate-react'; function MyEditor() { const onClick = event => { // Implement custom event logic... // When no value is returned, Slate will execute its own event handler when // neither isDefaultPrevented nor isPropagationStopped was set on the event }; const onDrop = event => { // Implement custom event logic... // No matter the state of the event, treat it as being handled by returning // true here, Slate will skip its own event handler return true; }; const onDragStart = event => { // Implement custom event logic... // No matter the status of the event, treat event as *not* being handled by // returning false, Slate will exectue its own event handler afterward return false; }; return ( <Editable onClick={onClick} onDrop={onDrop} onDragStart={onDragStart} {/*...*/} /> ) }
Patch Changes
-
#4266
411e5a19
Thanks @TheSpyder! - Removed accidental bundling ofslate-history
insideslate-react
-
#4307
a7e3a181
Thanks @clauderic! - Fix deletion of selected inline void nodes in Chrome. Chrome does not fire abeforeinput
event when deleting backwards within an inline void node, so we need to add special logic to handle this edge-case for Chrome only. -
#4272
294d5120
Thanks @clauderic! - Fix errors accessingglobalThis
in browsers that do not implement it -
#4295
dfc03960
Thanks @dubzzz! - Fix React warnings related toautoCorrect
andautoCapitalize
attributes being passed as a boolean instead of a string. -
#4271
ff267767
Thanks @omerg! - Fixed typo: RenamedtoSlatePoint
argumentextractMatch
toexactMatch
[email protected]
Minor Changes
- #4230
796389c7
Thanks @TheSpyder! - Applying invalidinsert_node
operations will now throw an exception for all invalid paths, not just invalid parent paths.
Patch Changes
-
#4245
b33a531b
Thanks @JonasKruckenberg! - Removed lodash dependecy to reduce bundled footprint -
#4208
feb293aa
Thanks @TheSpyder! - FixError: Cannot get the start point in the node at path [...] because it has no start text node
caused by normalizing a document where some elements have no children -
#4230
796389c7
Thanks @TheSpyder! - Exceptions ineditor.apply()
andEditor.withoutNormalizing()
will no longer leave the editor in an invalid state -
#4227
e6413d46
Thanks @ulion! - Fixed a bug that would allow multiple changes to be scheduled at the same time.