Release nativeEvent from GestureResponderEvent not caught on view when i release my second finger on the view

0
open
xaviermarchal
xaviermarchal
Posted 1 month ago

Release nativeEvent from GestureResponderEvent not caught on view when i release my second finger on the view #32413

Description

I'm building a react native where i want to capture all touch events that the user has done on his screen. I want to capture all start, move and end events, single or multi touch (i will capture the touch identifier as well).

What i noticed is when i'm doing multi touch, and release both my fingers, i don't see two release events, i only see one release event of my last finger. I did not find any documentation on that part, is that a bug or restriction?

My code could seem like a view is full size on my screen, using GestureResponderEvent with react-native, and props from a View onResponderStart and onResponderEnd.

React Native version:

System:
    OS: macOS 11.6
    CPU: (8) arm64 Apple M1
    Memory: 1.54 GB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.22.1 - ~/.nvm/versions/node/v12.22.1/bin/node
    Yarn: 1.22.10 - /opt/homebrew/bin/yarn
    npm: 7.22.0 - ~/.nvm/versions/node/v12.22.1/bin/npm
    Watchman: 2021.06.07.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK:
      API Levels: 26, 27, 29, 30
      Build Tools: 27.0.3, 28.0.3, 29.0.2, 30.0.3
      System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom_64, android-S | Google APIs ARM 64 v8a
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.2 AI-202.7660.26.42.7351085
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_292 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1
    react-native: 0.63.3 => 0.63.3
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Display the view and long press on the screen with your first finger
  2. Long press on the screen with your second finger
  3. Release the second finger
  4. Release the first finger

Expected Results

I expect to see in the console, given the following snack example i gave:

  • onResponderStart 0
  • onResponderStart 1 <== press in of my second finger
  • onResponderRelease 1 <== release of my second finger
  • onResponderRelease 0

What i see:

  • onResponderStart 0
  • onResponderStart 1
  • onResponderRelease 0

Snack, code example, screenshot, or link to a repository:

Run the following snack example on you device to do multi touch:

Snack example: https://snack.expo.dev/@developers-hokla/issues-with-release-event-identifier-1