Skip to content

Commit

Permalink
[RN Mobile] Fix crash when merging block (#15392)
Browse files Browse the repository at this point in the history
Upgrade RichText on mobile native to use the latest changes from the web, mainly those made in #14640

It also removes the customization we made to the rich-text library since writing in multiple formats at once is now stable on the web.

* Adding `onSelectionChange` from store to RichText

* First experiment fixing selection change handling in rich text

* Update readme change postcommit

* Fix sequence of events on split and selection change

* Remove commented onTextUpdate call on enter pressed

* Do not reset activeFormats when onSelectionChange is emitted while typing

* Update value from props

* Pinpoint conditions for the case where onSelectionChange is emitted without changing selection

* Improve isTyping detection

* Fix applying link format

* Do not try to update text from the paste handler

* onChange should update the state

* Selection change events always fire after text already changed

* Fix issue where the list block was not being selected on focus.

* Add isSelected prop from context to RichText

* Fix move caret to the end when merging.
This avoid moving the caret to the end when two blocks, both with content, are merged.

* Caret position from props, don't force to end

* Fix lint errors

* WIP: more fixes

* WIP: Fix list external Enter key on Android

* No stray onSelectionChanged events from AztecAndroid

* Only block html elements will be trimmed by AztecAndroid

* Mirror caret state on text change

* Fix issue on iOS where the format buttons were not working properly.
Pressing on the buttons didn't change the format of the selected text.

* Restore iOS autoscroll while editing.

* Cleanup

* Try a new approach to detect if the selection change event is manual or not

* Fix iOS issue with formats, where pressing the format buttons sometimes won't change the format of the selected text
  • Loading branch information
Tug authored May 15, 2019
1 parent 5bbda36 commit 761543e
Show file tree
Hide file tree
Showing 7 changed files with 258 additions and 432 deletions.
Loading

0 comments on commit 761543e

Please sign in to comment.