Skip to content

Remove focus from RichText when unmounting#16146

Closed
koke wants to merge 1 commit intornmobile/release-v1.7.0from
rnmobile/1126-fix-blur-crash
Closed

Remove focus from RichText when unmounting#16146
koke wants to merge 1 commit intornmobile/release-v1.7.0from
rnmobile/1126-fix-blur-crash

Conversation

@koke
Copy link
Copy Markdown
Contributor

@koke koke commented Jun 13, 2019

In #15999 this behavior was changed to prevent the keyboard from disappearing
when you press Enter to create a new paragraph.

This worked in that case, but had the side effect of TextInputState still
thinking a dead view had focus, and causing a crash in some scenarios.

Fixes wordpress-mobile/gutenberg-mobile#1126

Screen Recording 2019-06-13 at 09 17 45

To test:

  1. Remove all the content
  2. Insert an image
  3. Remove the image
  4. Ensure there's no crash

In #15999 this behavior was changed to prevent the keyboard from disappearing
when you press Enter to create a new paragraph.

This worked in that case, but had the side effect of TextInputState still
thinking a dead view had focus, and causing a crash in some scenarios.
@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 Jun 13, 2019
@hypest
Copy link
Copy Markdown
Contributor

hypest commented Jun 13, 2019

Closing in favor of #16151

@hypest hypest closed this Jun 13, 2019
@hypest hypest deleted the rnmobile/1126-fix-blur-crash branch June 13, 2019 10:33
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