You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug still exists in latest version 0.63.3 on Android. View's onStartShouldSetResponder works well.
But PanResponder's onStartShouldSetPanResponder works strangely.
If I touch the screen with two fingers, I get two events using View.onTouchStart, but only one invocation on a PanResponder's onStartShouldSetPanResponder callback (since I guess it aggregates those events). However, the number of reported touches is always just 1. There is simply no way to determine whether my PanResponder should actually handle a given touch event based on the supplied gesture information, as it's lacking the aggregated context. I assume that is not the desired behavior...
My use case: A view with a PanResponder within a FlatList. Depending on whether this is a pinch gesture or just a swipe, I need to grab the gesture or not in order to have the FlatList handle it.
Expected Results
On multi-touch gestures (e.g. two fingers touching the screen at the same time), the event and gestureState that are submitted to onStartShouldSetPanResponder should contain all active touches, not just one.
Snack, code example, screenshot, or link to a repository:
From #17928
Description
This bug still exists in latest version
0.63.3
on Android.View
'sonStartShouldSetResponder
works well.But
PanResponder
'sonStartShouldSetPanResponder
works strangely.React Native version:
Steps To Reproduce
If I touch the screen with two fingers, I get two events using View.onTouchStart, but only one invocation on a PanResponder's onStartShouldSetPanResponder callback (since I guess it aggregates those events). However, the number of reported touches is always just 1. There is simply no way to determine whether my PanResponder should actually handle a given touch event based on the supplied gesture information, as it's lacking the aggregated context. I assume that is not the desired behavior...
My use case: A view with a PanResponder within a FlatList. Depending on whether this is a pinch gesture or just a swipe, I need to grab the gesture or not in order to have the FlatList handle it.
Expected Results
On multi-touch gestures (e.g. two fingers touching the screen at the same time), the event and gestureState that are submitted to onStartShouldSetPanResponder should contain all active touches, not just one.
Snack, code example, screenshot, or link to a repository:
(Edit) I created snack
https://snack.expo.io/@darron1217/panresponder-multitouch
Create an app, run it locally with a PanResponder like this. You'll get three times "1":
The text was updated successfully, but these errors were encountered: