react-native-gesture-handler
react-native-gesture-handler copied to clipboard
[iOS][Expo] PanGestureHandler does not get active when it has a `simultaneousHandlers`
Description
The new release of Expo 46 seemed had broken gesture-handler on iOS, where when a PanGestureHandler
has simultaneousHandlers
on, it will never get active.
I have tested the same code base on Android, and it function as expected. Also tested on a bare React Native project, and it function as expected.
This issue did break Bottom Sheet library.
Preview
Expo
expo 46.0.6, react-native 0.69.4, react-native-gesture-handler 2.5.0, react-native-reanimated 2.9.1
https://user-images.githubusercontent.com/4061838/184496206-8ac2e172-aa55-430b-89c0-b28b4212a063.mov
React Native
react-native 0.69.4, react-native-gesture-handler 2.5.0, react-native-reanimated 2.9.1
https://user-images.githubusercontent.com/4061838/184496221-e571956e-7aee-49a1-be34-55228ddb4bae.mov
Steps to reproduce
- Run the snack provided on iOS
- Scroll the list
State won't get active
- Run the snack provided on Android
- Scroll the list
State will get active
Snack or a link to a repository
https://snack.expo.dev/@gorhom/7a1a40
Gesture Handler version
2.5.0
React Native version
0.69.4
Platforms
iOS
JavaScript runtime
JSC
Workflow
Expo managed workflow
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
Real device
Device model
iPhone
Acknowledgements
Yes
Hey! 👋
It looks like you've omitted a few important sections from the issue template.
Please complete Platforms section.
Some more informations from my side:
- Running the code in SDK 45 works
- Being at SDK 46, we tried to downgrade RNGH to 2.2.1, 2.4.0
- Being at SDK 46, we tried to downgrade REA and RNS to 2.8.0 and 3.11.1 an 3.14.1
onActive does not trigger with Expo, while it does with bare. I also used @gorhom Repro and ported it to RNGH v2, with GestureDetector. It is the same. onActive does not trigger.
Lol, EVERYTHING works in release mode. Its only dev mode thats broken. Here is a release video:
P:S: No difference between Hermes or JSC. The issue happens on both
https://user-images.githubusercontent.com/504909/184499657-a585e3e5-3b7b-4267-8c3b-9f1386ee03fb.mp4
i don't believe that this is an issue in react-native-gesture-handler itself, i can only reproduce this in projects with expo-dev-client installed or in expo go.
Yes, thats the same I was thinking and what I shared at twitter:
And I might have a GUESS what could be the issue: 3 finger long press gesture detection maybe for the dev menu, but its just a gut feeling
Thank for the detailed report, I'll look into it but I don't know how much I'll be able to help if it's an issue with Expo.
As a sidenote, it's interesting that it was working in SDK 45 as it looks really similar to https://github.com/software-mansion/react-native-gesture-handler/issues/1848 and https://github.com/software-mansion/react-native-gesture-handler/issues/1804, both of which are affecting only managed workflow.
I can confirm that this issue is caused by something in the dev-client codebase and I think I'll have a solution soon ;)
If you're using the expo-dev-client
, you can already test out the fix. Just bump the version of dev-client to 1.2.1
. The same fix will be available in Expo Go soon ;)
Thanks for the quick fix. Will report back soon
I can confirm that there are no issues anymore with 1.2.1! Thanks a ton
We had the same issue at my company. Upgrading the dev-client to 1.2.1 solved the issue for us. If anyone's curious, here's the relevant commit: https://github.com/expo/expo/commit/0ce07b3d1cc2c59fd213982266a44d54c5715358
This was driving me crazy, thanks so much for pointing out the fix!! Confirmed working here as well.