* Do not remove empty node in merge operation if it is first children in parent(#4228)
* Create merge-nodes-issue
* fix typo in changeset
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
* fix bug: decorate is not called for immediate children of editor
* short-circuit return instead of else in Child
Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
* oops missing brace
* changeset
Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
* Revert "Temporarily revert Android commits in order to create a release of Slate focused solely on Android (#4256)"
This reverts commit 4f502119841d013ea2749e91f4bd1f793dc7f98e.
* Updates to android composition manager
* Add user input tracking
It's necessary to only track mutations that result from user input. Some mutations that happen inside block or leaf nodes can happen outside of the render loop of the Editable component.
* Revert "Add DefaultEditable and AndroidEditable to exports (#4255)"
This reverts commit 5298e51f6e8a7d62acb71092f7afd6565cbdc65e.
* Revert "Feature/android keyboard support (#4200)"
This reverts commit e03ce7c5614a1a69d039bfbeea94696376585fd0.
* Added Android Keyboard Support
* Added changeset for android keyboard support
* Removed dead code in android editable that supported non-android environments
* Removed unnecessary attributes observation for android-editable
* Removed dead code
* Added no-error boundary
* Fixed issues with linters
* Update IS_FIREFOX_LEGACY flag to prevent FF crash
#4118 and #4150 introduced IS_FIREFOX_LEGACY, but this block of code was not updated to reflect that. This breaks insertion of emoji and unicode characters in slate-react. This change fixes#3855.
* Update editable.tsx
* Create forty-mails-roll.md
* Update editable.tsx
Apologies, in my tests I was using yarn patch and didn't need to modify the import statement, hopefully this will pass CI now.
Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
* Test cases for failure condition
* Before normalizing ensure all elements have at least one text child. This is a normalization requirement that some normalization fixes require, so it must be done as an initial dedicated pass.
* Added try/finally to editor.apply and Editor.withoutNormalizing for state cleanup
* Added insert_node path checking to match how other operations are applied
* Defined conditions to always split nodes
Those conditions are:
- When the anchor does not lie at the start of a node.
- When the focus does not lie at the end of a node.
* prev variable now points to correct updated node.
Previously, in the case the previous node gets merged in last iteration,
prev pointer could be pointing to the wrong node.
That posed problems, especially when normalizing empty text nodes.
So, now in every iteration, we get a copy of updated node structure,
and take value of prev from that.
* Test to check splitting and normalization logic.
- In this, since anchor and focus bleeds on both sides, splits happen.
- Empty text nodes are introduced on either side.
- New properties are set in the new node selection.
- Normalization happens and takes care of those empty text nodes.
* Create two-lies-appear.md
* Update two-lies-appear.md
Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
* Save some remove_text calls if the text is zero length.
* Remove unnecessary !text check - text is always string, and add similar check to 'insert_text' as well
* Create giant-adults-matter.md
Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
* Use null instead of undefined as the old value for set_node operations that add a property
* Changelog
* Omit undefined values from `set_node` operations completely. Delete missing property values in `Transforms.apply()` instead.
* Add tests for removing set_node properties with null and undefined
* fix ime double when apply mark
* add changeset
* refactor to use auto-incrementing key and add comments for it
* Update lovely-walls-knock.md
* Update lovely-walls-knock.md
Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
* feat: sync selection to extractly dom selection
* revert mistakenly modified files
* add changeset
* toSlatePoint will throw error again when not extractMatch
* Fix misspellings, rename extractMatch to exactMatch
* rename option to match code style
* Update four-poets-move.md
Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
* fix(react-editor): text node spacer can be non-existant if editor is in readonly mode
* v0.59.1
* Revert "v0.59.1"
This reverts commit 58cb7f1d61e81788e0257bace9be59bc47be8851.
* Update react-editor.ts
* Update react-editor.ts
* Create rude-lemons-crash.md
Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
* fix DOM selection can not be updated when use composition input on Safari #3196
* Update editable.tsx
* Create dry-deers-applaud.md
Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
* Fixed an issue with controlled value messing up editor.selection
* Create fifty-ducks-sip.md
Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>