-
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
Don't passthru key events that override Pressibilty api's #1731
Don't passthru key events that override Pressibilty api's #1731
Conversation
Interesting, I didn't realize |
If those callbacks are being handled in Pressability, we should remove them from |
FWIW, I personally feel like all the Touchable* components are soft deprecated and I don't want to support them. Buuuut way too many people still use it so I can't pitch that to React Native Core just yet 😅. In the meantime, I would recommend that you replace existing uses of Touchable with Pressable for the best experience :) |
Yes, completely agree and we are slowly working on replacing them with |
Just looked into this. Since |
Summary: **Context** Sync GH Change from RND OSS [Don't passthru key events that override Pressibilty api's microsoft#1731](microsoft#1731) **Change** * Don't passthru key events that override Pressibilty api's Test Plan: |before|after| | https://pxl.cl/2vqGM |https://pxl.cl/2vqFX| Subscribers: generatedunixname89002005327315 Differential Revision: https://phabricator.intern.facebook.com/D43705649
Please select one of the following
Summary
#1623 added support for "Enter" and "Space" as default keys to trigger
onKeyDown
on Pressability which will callonPress
If the
onKeyDown
oronKeyUp
was passed as a prop toTouchableWithoutFeedback
, this would clobber the Pressability callback and theonKeyDown
->onPress
chain would never get triggered.CleanShot.2023-02-10.at.15.33.42.mp4
Pressibility supports calling the
onKeyDown|up
if it's passed as a prop.react-native-macos/Libraries/Pressability/Pressability.js
Lines 627 to 630 in b2b61ac
Changeling
[macOS] [Fix] - Don't passthru key events that override Pressibilty api's
Test Plan
CleanShot.2023-02-10.at.15.32.51.mp4