-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Invalid behavior Pressable in ScrollView #30563
Comments
There's some related discussion in #29376 where the regression was reported. The change to A lot of UI pressables are NOT in scrollviews. Consider the back button for navigation. Prior to the aforementioned change there would be no feedback for when it was pressed, because the delay was too long before the new screen slid in. An |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
This issue was closed because it has been stalled for 7 days with no activity. |
Does anyone have answer for this problem. I have a Pressable in ScrollView, but the pressable doesn't let me scroll because the scroll trigers the press event |
Hello @Firesoul18 , @jfrolich :) I have exactly the same problem (I've already asked the question here, but no relevant answer). Have you found a solution? Thanks :) |
Description
The
delayPressIn
was set to 0 in this commit. 86ffb9c. This removes the delay for pressing a button. This is fine if the button is not in aScrollView
but this delay is designed to not triggerpressIn
while scrolling (see native iOS touchables). So basically everyPressable
that's being used in aScrollView
has invalid behavior.React Native version:
0.63.4
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
ScrollView
Expected Results
There should be a way to set this delay (it is
delayPressIn
is not available on thePressable
component). I think it best to:Pressable
componentThis is because in my experience most Pressables are part of a ScrollView, and if they're not part of a
ScrollView
, the small delay is unnoticeable (it might even be the same for native controls). If a delay of 130ms is not acceptable (perhaps in a game scenario or something like that) it can be configured.The text was updated successfully, but these errors were encountered: