Open rogerkerse opened 4 years ago
Exactly the same code on Android and if the component is transformed, no handlers work, every event is passed through element to underlying list
Similar issue here.. I have a map underneath my draggable view and after the first drag the view does not respond to the drag anymore and the event is passed to the map! this happens only on Android, IOS works ok!
Is someone actively developing this library?
Any update?
Bump
Well, I have a similar problem. Maybe, it is not 100% of the same nature, but I ended up in this issue while searching for a solution, so, hopefully it will help someone else, too.
Basically, I have a drop-down menu that slides down from under the navigation bar at the top of the screen. The menu, obviously, has position: "absolute"
, and involves transform
with translateY
to show/hide itself. And when expanded, any press event falls through the menu down to the component under it. Note, however, that in my case touch even registers both in menu, and in the component under it.
My "fix" is placing another view that "swallows" any touch even right under the problematic component (doc):
<Animated.View ...>
<View ...>
<Menu ... />
</View>
<View pointerEvents="none" ... /> // <-- Here
</Animated.View>
I'm using
"react-native-gesture-handler": "^2.9.0",
As in regard to the original issue – probably, a similar approach can help there as well: conditionally adding a similar view under the moving one to confine touch events to it and prevent them from passing through.
This is expected behaviour (video how this library works on iOS):
On Android after player is dragged down, it doesn't accept any presses. Every press on player gets passed to list underneath instead. This is clearly wrong behaviour.
Code is following: package.json
index.js/App.js
PipLayout.js