Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[RNMobile] Focus RichText on mount if block is selected and says so #15878
Some blocks have multiple RichText or a RichText among other children. Example: Quote blocks has 2 RichTexts and Image block has a RichText for the caption. We want to control when and which of those RichTexts will request focus. On the web side, the DOM is used to search for a inputbox to focus but on RN, we don't have a DOM to search.
In this PR instead, we make the assumption that a RichText will always request focus if its parent has passed
How has this been tested?
Using this gutenberg-mobile side PR: wordpress-mobile/gutenberg-mobile#1043
Types of changes
Introducing a flag combination for the RichText to determine whether it should request focus upon mounting.