wonday / react-native-pdf

A <Pdf /> component for react-native
MIT License
1.6k stars 557 forks source link

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

Open bitcrumb opened 6 months ago

bitcrumb commented 6 months ago

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

bitcrumb commented 6 months ago

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).

TajGoud commented 5 months ago

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

harrymash2006 commented 5 months ago

Any luck on this?

SruthiVj commented 4 months ago

Facing same issue

aswin-clear commented 3 months ago

Same issue +1

sacmii commented 3 months ago

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];
`