react-native-pdf icon indicating copy to clipboard operation
react-native-pdf copied to clipboard

Links on iOS not working due to code change introduced with the new `enableDoubleTapZoom` option

Open bitcrumb opened this issue 1 year ago • 6 comments

See my comment: https://github.com/wonday/react-native-pdf/pull/797#issuecomment-2124972455

bitcrumb avatar May 22 '24 14:05 bitcrumb

Could somebody explain why we need to disable system-provided UITapGestureRecognizer for the enableDoubleTapZoom to work? If so, I could maybe come up with a suggested fix.

Since disabling all UITapGestureRecognizers (as currently is the case) seems like a very brutal approach (which breaks other things).

bitcrumb avatar May 22 '24 14:05 bitcrumb

Same issue for me. in android it is working fine but in IOS on pressing on links or any events are not working.

TajGoud avatar Jun 06 '24 09:06 TajGoud

Any luck on this?

harrymash2006 avatar Jun 10 '24 16:06 harrymash2006

Facing same issue

SruthiVj avatar Jun 26 '24 11:06 SruthiVj

Same issue +1

aswin-clear avatar Aug 12 '24 06:08 aswin-clear

Removing following enabled Links, Double Tap will stop working:

node_modules/react-native-pdf/ios/RNPDFPdf/RNPDFPdfView.mm

     // Disable built-in double tap, so as not to conflict with custom recognizers.
-    for (UIGestureRecognizer *recognizer in _pdfView.gestureRecognizers) {
-        if ([recognizer isKindOfClass:[UITapGestureRecognizer class]]) {
-            recognizer.enabled = NO;
-        }
-    }

-    [_pdfView addGestureRecognizer:doubleTapEmptyRecognizer];
`

sacmii avatar Aug 12 '24 06:08 sacmii