Skip to content

Commit

Permalink
Merge pull request #77 from notclive/native-responder-default-fix
Browse files Browse the repository at this point in the history
Fix bug where default value of onShouldBlockNativeResponder was false instead of true
  • Loading branch information
elliottkember committed Oct 27, 2023
2 parents 7ea3768 + 720ada8 commit fb93fe0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ReactNativeZoomableView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ class ReactNativeZoomableView extends Component<
gestureState,
this._getZoomableViewEventObject()
),
// Defaults to true to prevent parent components, such as React Navigation's tab view, from taking over as responder.
onShouldBlockNativeResponder: (evt, gestureState) =>
!!this.props.onShouldBlockNativeResponder?.(
this.props.onShouldBlockNativeResponder?.(
evt,
gestureState,
this._getZoomableViewEventObject()
Expand Down

0 comments on commit fb93fe0

Please sign in to comment.