Skip to content

Android pointer number remains 2 when lifting one finger during pinch gestureΒ #3435

@znikap

Description

@znikap

Description

When performing a pinch gesture on Android, if one finger is lifted, the numberOfPointers property incorrectly remains at 2. This causes the focal point coordinates (focalX and focalY) to shift drastically, disrupting the pinch gesture handling.

You can view the experience here (please ignore the offsets it's a quick example):

Screen_Recording_20250305_183544_gesture-pinch-bug-android.mp4

This only happens on android, the experience of pinching is always creating the "jumping" effect.
Any help would be appreciated :3

Steps to reproduce

  1. Start a pinch gesture on an Android device with two fingers.
  2. Lift one finger while continuing to pinch the remaining finger.
  3. Observe the values of numberOfPointers, focalX, and focalY during the onChange or onUpdate event.

Snack or a link to a repository

https://snack.expo.dev/@znikap/bug-android-on-pinch

Gesture Handler version

2.20.2, 2.24.0

UPD: Is not happening on 2.16.2

React Native version

0.74.5

Platforms

Android

JavaScript runtime

None

Workflow

Expo SDK 51

Architecture

None

Build type

None

Device

Real device

Device model

No response

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Platform: AndroidThis issue is specific to AndroidRepro providedA reproduction with a snack or repo is provided

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions