Closed lukahc closed 9 months ago
Hi! This sounds like a great candidate for a pull request. If you are able to fix the problem in a PR, please submit it and we'll take a look.
@lukahc Thank you for the help! Turns out I needed this functionality almost immediately. Very useful.
Do you think this should be true
by default? It seems like it would always be a good idea for it to block pan responders.
@lukahc Thank you for the help! Turns out I needed this functionality almost immediately. Very useful.
Do you think this should be
true
by default? It seems like it would always be a good idea for it to block pan responders.
I agree, I can't think of many scenarios where it would be better for it to be false
, I can make a PR for that change
Nice – I think that should be fine.
An interesting note: onShouldBlockPanResponder
is only implemented on Android.
However, I found that it was working on iOS too, but only because I happened to be using a react-native-gesture-handler
wrapper. That library overrides UIManager to make this work. More info here: https://github.com/facebook/react-native/pull/40750
Currently the zoomable view conflicts with other packages like react native tab view because of line 130 in
src/ReactNativeZoomableView.tsx
:onShouldBlockNativeResponder: () => false,
This line can lead to the
PanResponder
being terminated if there are other instances ofPanResponder
, meaning that the zoomable view can't pan or zoom properly, if at all. Could you please fix this, either by changingfalse
totrue
, or just by makingonShouldBlockNativeResponder
an optional prop?