react / react/react-native

onResponderRelease on View is called one time when releasing two fingers or more at exactly the same time.

未关闭
#48,416 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

API: Easing Issue: Author Provided Repro
主要语言
C++
星标
127k
派生
25.3k
平均合并
1 天 23 小时
30 天内合并 PR
4

描述

Description

Code:

<View
      style={styles.container}
      onStartShouldSetResponder={() => true}
      onMoveShouldSetResponder={() => true}
      onResponderStart={addFingerOnScreen}
      onResponderMove={moveFingersOnScreen}
      onResponderRelease={releaseFingerFromScreen}>
</View>

Actions:

  • I pressed the screen (on the view) with two fingers
  • I released the screen with my two fingers on exactely on the same time

Result:

onResponderRelease is called one time with touches legnth 1 and changed touches lenght 1.

Expected:

onResponderRelease is called two times. The first time with touches length 1 and changed touches length 1. The second time with touches length 0 and changed touches length 1.

OR

onResponderRelease is called 1 time. The first time with touches length 0 and changed touches length 2.

Steps to reproduce
  • I pressed the screen (on the view) with two fingers
  • I released the screen with my two fingers on exactely on the same time
React Native Version

0.76.5

Affected Platforms

Runtime - Android

Output of npx react-native info
System:
  OS: macOS 15.2
  CPU: (8) arm64 Apple M1
  Memory: 324.31 MB / 8.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.12.2
    path: ~/.nvm/versions/node/v20.12.2/bin/node
  Yarn: Not Found
  npm:
    version: 10.5.0
    path: ~/.nvm/versions/node/v20.12.2/bin/npm
  Watchman:
    version: 2024.12.02.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/Modis/.rvm/gems/ruby-2.7.6/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10227.8.2321.11479570
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.13
    path: /usr/bin/javac
  Ruby:
    version: 2.7.6
    path: /Users/Modis/.rvm/rubies/ruby-2.7.6/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.5
    wanted: 0.76.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true
Stacktrace or Logs
-
Reproducer

https://github.com/mohamed-amine-haine/responder-release-bug

Screenshots and Videos

No response

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先在 Android 上运行链接的 responder-release-bug reproducer,并检查 issue 中显示的 View responder 回调。当两根手指同时释放时,比较回调次数以及 touches/changedTouches 的值;当报告的 release 行为符合预期结果之一时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
android, javascript, react-native
领域
mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。