Skip to content

Conversation

koke
Copy link
Contributor

@koke koke commented Dec 20, 2018

Fixes an issue where TextInputState would still believe a specific RichText instance was focused after it was removed from view, so selecting any non-text block (e.g. image) would try to blur a RichText that didn't exist anymore and crash.

This will check if RichText is focused and unfocus when the component is unmounted

To fix wordpress-mobile/gutenberg-mobile#415
Relevant PR at wordpress-mobile/gutenberg-mobile#423

@koke koke requested a review from mzorz December 20, 2018 17:48
@koke koke added this to the Mobile Alpha milestone Dec 20, 2018
@koke koke added the Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) label Dec 20, 2018
Copy link
Contributor

@mzorz mzorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@koke koke merged commit 96a73c5 into rnmobile/release/0.3 Dec 20, 2018
@koke koke deleted the rnmobile/richtext-fix-blur-on-unmount branch December 20, 2018 18:21
hypest pushed a commit that referenced this pull request Jan 2, 2019
* temporarily disable link formatting

* Make sure RichText resigns focus when unmounted (#13048)
diegoreymendez added a commit that referenced this pull request Jan 24, 2019
* temporarily disable link formatting

* Make sure RichText resigns focus when unmounted (#13048)

* Implements a native version of post-title.

* Removes some unnecessary log calls.

* Submits a few lint fixes.

* Fixes a linting issue.

* When focusing the title, any focused block loses its focus.

* FocusOut is now wired for post-title for mobile.

* Removes unused some code.

* Added a file I failed to commit.

* Fixes a linting issue.
youknowriad pushed a commit that referenced this pull request Mar 6, 2019
* temporarily disable link formatting

* Make sure RichText resigns focus when unmounted (#13048)
youknowriad pushed a commit that referenced this pull request Mar 6, 2019
* temporarily disable link formatting

* Make sure RichText resigns focus when unmounted (#13048)

* Implements a native version of post-title.

* Removes some unnecessary log calls.

* Submits a few lint fixes.

* Fixes a linting issue.

* When focusing the title, any focused block loses its focus.

* FocusOut is now wired for post-title for mobile.

* Removes unused some code.

* Added a file I failed to commit.

* Fixes a linting issue.
youknowriad pushed a commit that referenced this pull request Mar 6, 2019
* temporarily disable link formatting

* Make sure RichText resigns focus when unmounted (#13048)
youknowriad pushed a commit that referenced this pull request Mar 6, 2019
* temporarily disable link formatting

* Make sure RichText resigns focus when unmounted (#13048)

* Implements a native version of post-title.

* Removes some unnecessary log calls.

* Submits a few lint fixes.

* Fixes a linting issue.

* When focusing the title, any focused block loses its focus.

* FocusOut is now wired for post-title for mobile.

* Removes unused some code.

* Added a file I failed to commit.

* Fixes a linting issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants