Fix Android pinch pointer lift handling#4215
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Fixes pinch gesture handler on Android to end/cancel when the pointer count drops below the minimum required (2) due to a pointer being lifted, not just on the final ACTION_UP.
Changes:
- Detect when a pointer-up event reduces active pointers below
MIN_POINTERS. - Trigger state transition (cancel/end) in that case alongside ACTION_UP.
- Introduce
MIN_POINTERScompanion constant.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hey! Thanks for bringing it to our attention. Your PR would cause I've looked a bit more into this, and it's a general issue with all handlers where, on |
Summary
numberOfPointers/ focal data after one finger is liftedFixes #3435.
Test plan
yarn workspace react-native-gesture-handler lint:android./gradlew :app:assembleDebug --console=plain -PreactNativeArchitectures=arm64-v8afromapps/basic-example/android