Skip to content

[RNTester] Fix tabIndex Example#8644

Merged
agniuks merged 2 commits into
microsoft:mainfrom
agniuks:tabIndexTest
Sep 18, 2021
Merged

[RNTester] Fix tabIndex Example#8644
agniuks merged 2 commits into
microsoft:mainfrom
agniuks:tabIndexTest

Conversation

@agniuks
Copy link
Copy Markdown
Contributor

@agniuks agniuks commented Sep 17, 2021

In order to test tabIndex, a component must be focusable. In the keyboarding example page we use TouchableHighlight in the tabIndex example, this adds an onPress() function to those components to make them focusable and make the example functional.

Microsoft Reviewers: Open in CodeFlow

@agniuks agniuks requested a review from a team September 17, 2021 19:17
Copy link
Copy Markdown
Contributor

@NickGerleman NickGerleman left a comment

Choose a reason for hiding this comment

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

Consider explicitly setting "focusable".

History here is we used to have a prop "acceptsKeyboardFocus", and our own logic for whether a Touchable should be focusable by default. A focusable prop, with its own logic, was added upstream. This added the behavior that disabled, or Touchables missing callbacks are not focusable by default.

@agniuks
Copy link
Copy Markdown
Contributor Author

agniuks commented Sep 17, 2021

Looks like the checks are failing in TextViewManager, likely #8454 conflicting with other changes to that file since the checks on it last ran - working on a fix.

@agniuks agniuks merged commit 3cf0725 into microsoft:main Sep 18, 2021
@agniuks agniuks deleted the tabIndexTest branch September 18, 2021 00:17
chrisglein pushed a commit to chrisglein/react-native-windows that referenced this pull request Sep 22, 2021
* make example functional

* explicitly focusable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants