Skip to content

Conversation

@tobyt42
Copy link
Contributor

@tobyt42 tobyt42 commented Dec 24, 2023

Double tap remains enabled by default but can be optionally disabled.

This is based on a patch that was posted on this issue #528, which I've made minor adjustments to whenever I needed to apply it to a newer react-native-pdf version.

Some users of my app have reported that they accidentally activate zoom without double tapping (it seems to be an issue on some devices only), hence I have used this patch to give users the option to disable double-tap zooming. Setting maxScale to 1 as reported on the linked issue, did not help with the issue for me.

@joaonew
Copy link

joaonew commented Dec 27, 2023

I need this option, can we have it merged???

@wonday
Copy link
Owner

wonday commented Jan 7, 2024

It is cool, but can you modify the readme file together?

@tobyt42
Copy link
Contributor Author

tobyt42 commented Jan 7, 2024

Readme updated

@wonday wonday merged commit bcaff69 into wonday:master Jan 16, 2024
@bitcrumb
Copy link

@tobyt42 See my comment here

This change effectively breaks link detection on iOS due to the disabling of the UITapGestureRecognizer. This breaks both internal links (e.g. to a different page) as well as external links.

I currently work around this by disabling enableDoubleTapZoom and applying the following patch:
react-native-pdf+6.7.5.patch (although only applying the patch is effective enough).

@tobyt42
Copy link
Contributor Author

tobyt42 commented May 22, 2024

I would suggest creating a pull request against react-native-pdf

@bitcrumb
Copy link

@tobyt42 I've opened an issue.

Since I don't know the exact reasoning behind introducing the enableDoubleTapZoom and why the UITapGestureRecognizer should be disabled for it to work, I can't propose an easy fix.

My patch just comments out the disabling of the tap gesture recognizer & since I don't think I need the enableDoubleTapZoom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants