Gesture.Tap() behaving weirdly, one finger needs to be on screen to receive onStart and onEnd events
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- react-native, typescript
- Lĩnh vực
- mobile
Hướng nghiên cứu
Bắt đầu với Expo Snack được cung cấp và ví dụ index-file sử dụng Gesture.Tap và GestureDetector, tái hiện các callback trên Android và iOS với React Native 0.74.5 và Gesture Handler 2.18.1. So sánh một lần chạm thông thường với chuỗi thao tác có thêm một ngón tay; được xem là hoàn tất khi onStart và onEnd được gọi đối với các lần chạm thông thường mà không yêu cầu một ngón tay khác phải tiếp tục ở trên màn hình.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
Hey RNGH developers,
I have been using react native gesture handler for quite sometime now and it's doing an amazing job, However recently I have been experimenting with React three Fiber in an expo react native project.
For the tap gesture, only the onBegin callback is triggered, and no matter how many times I tap, I only receive onBegin events. After further experimentation, I realized that for the onStart and onEnd callbacks to be fired, one finger needs to be placed on the screen before performing the normal tap motion. This triggers the onStart and onEnd callbacks.
Below is my code snippet and a snack link for experimentation.
const tap = Gesture.Tap()
.onBegin(() => {
console.log("Begin");
})
.onStart((event) => {
console.log("start");
})
.onEnd((event) => {
console.log("end");
});
return (
<GestureDetector gesture={tap}>
<View style={{ flex: 1 }}>
<Canvas
style={{
flex: 1,
}}
>
<ambientLight intensity={0.1} />
<directionalLight color="red" position={[0, 0, 5]} />
<mesh
onClick={() => {
console.log("mesh click");
}}
>
<boxGeometry />
<meshStandardMaterial />
</mesh>
</Canvas>
</View>
</GestureDetector>
);
Hoping to really get this solved, I believe providing support for React Native Gesture Handler with react three fiber will really help in the upcoming days as support for react-native-wgpu is announced and three js already has running examples for using WebGPU and also since its the only library that has both internal and external interaction system in 3D space for react native.
[!WARNING]
Trying to run the latest versions of react three fiber will throw this particular error raised in issue . I would recommend using a real device so that you can dismiss these errors on the error popup screen.
Steps to reproduce
- Install Expo React native project with React Three Fiber and React native gesture Handler
- Copy the above code and place it on index file after wrapping your layout with GestureHandlerRootView
- Test tapping the screen to get onBegin callbacks
- Place one finger and try tapping again to get onStart and onEnd callbacks (which is not the expected behaviour )
Snack or a link to a repository
https://snack.expo.dev/@ashkalor/authentic-blue-salsa
Gesture Handler version
2.18.1
React Native version
0.74.5
Platforms
Android, iOS
JavaScript runtime
None
Workflow
Expo bare workflow
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
Real device
Device model
Samsung Galaxy Tab A9
Acknowledgements
Yes
- Ngôn ngữ chính
- TypeScript
- Star
- 6.8k
- Fork
- 1.1k
- Merge trung bình
- 2 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 28
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của software-mansion/react-native-gesture-handler
-
GestureDetector should bubble touches if all gestures fail (or some other generalized solution)Đang mởMissing repro Platform: Android Platform: iOS
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 39/100
software-mansion/react-native-gesture-handler#4714 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Web] A pan that starts on a Pressable presses it when the mouse button is releasedCó thể đã có người làm @mokshupadhyay đã nhận 2 ngày trước. Đang mởPlatform: Web
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
software-mansion/react-native-gesture-handler#4713 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[iOS] Crash at app exit: static `_managers` map destroyed while `flushOperations` reads itCó thể đã có người làm @beqramo đã nhận 5 ngày trước. Đang mởMissing info Missing repro Platform: iOS Platform: MacOS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 30/100
software-mansion/react-native-gesture-handler#4711 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[iOS][Fabric] Recognizer of a live handler stays on a recycled view and takes every drag on the component that reuses itCó thể đã có người làm @nihar777 đã nhận 6 ngày trước. Đang mởPlatform: iOS
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
software-mansion/react-native-gesture-handler#4710 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[iOS] Button press feedback invisible on quick taps when Reduce Motion is enabledCó thể đã có người làm @andreialecu đã nhận 8 ngày trước. Đang mởMissing info Platform: iOS Platform: MacOS
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
software-mansion/react-native-gesture-handler#4707 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của software-mansion/react-native-gesture-handler
Issue tương tự
-
agentic-workflows
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
opencollective/opencollective-frontend#12789 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Web download page shows a file as Completed when its download from S3 fails with an error responseĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
awslabs/visual-asset-management-system#2097 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
openwatersio/slackwater#591 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
compiler-explorer/compiler-explorer#9738 ·
Maintainer thường phản hồi trong vòng 2 ngày