Gesture.Tap() behaving weirdly, one finger needs to be on screen to receive onStart and onEnd events
Les mainteneurs répondent en général sous 2 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 42/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- react-native, typescript
- Domaine
- mobile
Piste de recherche
Commencez avec l’Expo Snack fourni et l’exemple de index-file utilisant Gesture.Tap et GestureDetector, en reproduisant les callbacks sur Android et iOS avec React Native 0.74.5 et Gesture Handler 2.18.1. Comparez un tap normal avec la séquence impliquant un doigt supplémentaire ; c’est terminé lorsque onStart et onEnd sont déclenchés pour les taps ordinaires sans nécessiter qu’un autre doigt reste à l’écran.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- TypeScript
- Étoiles
- 6.8k
- Forks
- 1.1k
- Merge moyen
- 2 j 17 h
- PR mergées (30 j)
- 28
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Aucun guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de software-mansion/react-native-gesture-handler
-
GestureDetector should bubble touches if all gestures fail (or some other generalized solution)OuverteMissing repro Platform: Android Platform: iOS
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 39/100
software-mansion/react-native-gesture-handler#4714 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
[Web] A pan that starts on a Pressable presses it when the mouse button is releasedPeut-être pris @mokshupadhyay l’a pris il y a 2 jours. OuvertePlatform: Web
Difficulté 4/5 3-5 jours Accessibilité débutants 57/100
software-mansion/react-native-gesture-handler#4713 ·
Les mainteneurs répondent en général sous 2 jours
-
[iOS] Crash at app exit: static `_managers` map destroyed while `flushOperations` reads itPeut-être pris @beqramo l’a pris il y a 6 jours. OuverteMissing info Missing repro Platform: iOS Platform: MacOS
Difficulté 2/5 1-3 heures Accessibilité débutants 30/100
software-mansion/react-native-gesture-handler#4711 · 3 commentaires ·
Les mainteneurs répondent en général sous 2 jours
-
[iOS][Fabric] Recognizer of a live handler stays on a recycled view and takes every drag on the component that reuses itPeut-être pris @nihar777 l’a pris il y a 6 jours. OuvertePlatform: iOS
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
software-mansion/react-native-gesture-handler#4710 · 2 commentaires ·
Les mainteneurs répondent en général sous 2 jours
-
[iOS] Button press feedback invisible on quick taps when Reduce Motion is enabledPeut-être pris @andreialecu l’a pris il y a 8 jours. OuverteMissing info Platform: iOS Platform: MacOS
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
software-mansion/react-native-gesture-handler#4707 · 2 commentaires ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de software-mansion/react-native-gesture-handler
Issues similaires
-
needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
EPPIcenter/sampledb3#162 ·
-
Particle-1 modelOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
tashfeenahmed/freellmapi#2169 ·
Les mainteneurs répondent en général sous 1 jour
-
via-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 79/100
Les mainteneurs répondent en général sous 1 jour
-
🎙️ task - feat(mechanic): pave git.pull.close, a close of a superseded pull with its why on recordOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
ehmpathy/rhachet-roles-ehmpathy#1576 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
vercel-labs/ui#1563 ·
Les mainteneurs répondent en général sous 1 jour