I have a scrollview with a grid of images when I long press on an image I’d like to stop propagating the mouse events to the scrollview and just monitor the movements. With the
In my case, the onPress
of the outer touchable was invoked first, even though I pressed the inner touchable.
What I did, was to use the onPressIn
and onPressOut
in the inner touchable to determine whether the user pressed the inner or outer touchable - by setting a flag in the component class, on onPressIn
and clearing it on onPressOut
, and then checking for that flag in the onPress
handler of the outer touchable, bailing out if it's set.