Closed chillios-dev closed 4 years ago
I'm seeing this with just Android. iOS still seems to be working.
Just to confirm, upgraded to the latest rn 0.61.0-rc.2 and onPress is not triggered in Android. iOS works fine.
With 0.61.0-rc.2 also all the components relying on PanGestureHandler don't seem to work. Native Swipeable and react-native-modalize
don't accept any swipe gestures anymore.
I don't know why, but in my simulator, I don't get any issue, but in production I get. My problem was also in the library react-native-modalize, which uses react-native-gesture-handler under the hood.
This is the issue I got in sentry: Unsupported top level event type "onGestureHandlerStateChange" dispatched
Ended reverting to 0.60.5
Did anyone find a workaround for Android?
Possibly a duplicate of https://github.com/kmagiera/react-native-gesture-handler/issues/729
I tried 0.61-rc.3. It has such problem only on Android. AndroidX was enabled.
I found the code snipped in this issue #320 fixes the issue:
for (let k in UIManager) {
if (
UIManager.hasOwnProperty(k) &&
UIManager[k] &&
UIManager[k].directEventTypes
) {
UIManager[k].directEventTypes.onGestureHandlerEvent = {
registrationName: 'onGestureHandlerEvent',
}
UIManager[k].directEventTypes.onGestureHandlerStateChange = {
registrationName: 'onGestureHandlerStateChange',
}
}
}
Using gestureHandlerRootHOC
has worked for me instead:
https://github.com/react-native-community/releases/issues/140#issuecomment-532819601
Using
gestureHandlerRootHOC
has worked for me instead:
That didn't work for me. But that was 0.61-rc.0, didn't test after that.
@kmagiera I'm closing this as RNGH is working properly with RN 61.1.
Thanks 🙌 🙌 🙌
same issue on RN 61.2
still seems not to be fixed in RN 0.61.5
I have been able to reproduce this behavior in the current example app.
https://github.com/software-mansion/react-native-gesture-handler/issues/920
@panda0603 me too, after read the documentation follow that step still seems not to be fixed in RN 0.61.5
Any update on this ticket please?
Yup, confirm android RN 0.61.5 PanGestureHandler not working, any update or workaround?
Can anyone please point us to a solution ?
I was having the same issue and then by removing the useScreen() function from react-navigation, all the touches on Android went through. It might be helpful to note it.
I found a workaround, replace componentDidUpdate() to UNSAFE_componentWillUpdate(), working on RN 0.61.5.
@dsznajder This issue can be reproduced with the latest RN version, could You please reopen the issue?
Same issue here
For me, the problem was solved by using the Touchable*
from the react-native-gesture-handler
package instead of the ones from react-native
. On RN 0.63 it also doesn't work with the new Pressable
component.
I found that this happens after opening a modal. All touchables or gestures stop working. When you remove flipper from the app the problem is gone. So it's probably a new bug in flipper.
Hi,
With newest RC version,
onPress
event is not triggered. I'm not sure yet with GestureHandlers but I will create repro example with both 60.x & 61.x.