react-native PanResponder not behaving as expected on web

379 Views Asked by At

Please take a look at this example on the react native docs. https://reactnative.dev/docs/panresponder

On a device, if you start a touch outside of the box and then drag over the box, the PanResponder doesn't trigger (this is the expected behaviour)

But on web, if you start a click outside of the box then drag your mouse over the box, the box will start dragging along with your cursor.

Is there a way to only trigger the PanResponder if the click started on the element that is responding?

enter image description here

0

There are 0 best solutions below