Fix Custom Focus Ordering for FocusForwar, FocusBackwards and nested children
Summary: Before we were relying on absolute focus direction to determine the next focusable view inspired by Recycler View's implementation. This turned out to be inaccurate since FocusForward and FocusBackward do the ordering differently.
For FocusForward and FocusBackwards the children of the root node are ordered first from top to bottom then, row groups are created by getting views with the same vertical position and then everything else is sorted left to right.
Android creates an array with this order and then just focuses the next or previous element of this list. We don't do this but now FocusForward and FocusBackward follow the some comparisons used to build this array on Android.
Also, there was an issue with nested children within an accessible view, this just needed a bit of refactor on the focusSearch function so that we can tell when we actually need to trigger our custom focus search
Differential Revision: D75301251
This pull request was exported from Phabricator. Differential Revision: D75301251
This pull request was exported from Phabricator. Differential Revision: D75301251
This pull request was exported from Phabricator. Differential Revision: D75301251
This pull request was exported from Phabricator. Differential Revision: D75301251
This pull request was exported from Phabricator. Differential Revision: D75301251
This pull request was exported from Phabricator. Differential Revision: D75301251
This pull request was exported from Phabricator. Differential Revision: D75301251
This pull request was successfully merged by @jorge-cab in 2c04b54c051b8f69275cf093096b7eaa1a3b738e
When will my fix make it into a release? | How to file a pick request?
This pull request has been merged in facebook/react-native@2c04b54c051b8f69275cf093096b7eaa1a3b738e.