-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return and Space keys do not trigger onPress events #1622
Comments
I actually have a draft PR out for this: #1614 However, I think the better long term thing to do is deprecate our 'validKeysDown' prop in favor of 'keyDownEvents', the prop used in React Native Windows for a few reasons:
I have another draft PR out to switch us to the new prop: #1615 Both PRs are on my backlog, and I wasn't any to merge either soon. If this issue is blocking, I can prioritize the first one perhaps. |
Oh, great! I also made a draft PR with a fix here: https://github.com/microsoft/react-native-macos/pull/1623/files. Its nearly the same as your except instead of fixing the "validKeys" collection in the JS, I fixed it in the native RCTView.m code as I was having trouble fixing all the Pressability components -- Pressable just worked, but the various Touchables did not. I'll test your branch. One problem I see in your branch tho: you test for It is a priority for us as its an accessibility regression since .68 |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Environment
Steps to reproduce the bug
In RNTester, go to the Pressable page
Press the Tab key to move the focus ring to a Presable
Press Return key or Space bar
Expected Behavior
Pressing Return or Space should trigger the press of the Pressable
Actual Behavior
The system Beep chimes and no press event is triggered
Reproducible Demo
No response
Additional context
This is a regression starting in .68.
.68 introduced the
validKeysDown
prop. It seems like Touchable and Pressable should have "enter" and "space" on by default.The text was updated successfully, but these errors were encountered: