wonday / react-native-pdf

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

iOS-specific double-tap behavior for scaling and scrolling PDFs #729

Closed EmilianoMorghen closed 1 year ago

EmilianoMorghen commented 1 year ago

What react-native version are you using? 0.68.5

What react-native-pdf version are you using? 6.6.2

What platform does your issue occur on? iOS

Describe your issue as precisely as possible: When the user doubleTap on the Pdf it scales to maxScale and scrolls to top left corner. This only happens on iOS.

Steps to reproduce: 1) Render a pdf 2) Double tap on it

StefanLuecke commented 1 year ago

same problem just with the newest react-native version (71.4)

abarnto commented 1 year ago

Hi there.

I've just opened a PR with the fix. I don't know Objective-C that much, so maybe there could be a better way to fix the problem... but it gets the job done. I tested it both on iPhone and iPad, check the examples attached to the PR.

Just in case you need the fix right away, here's the patch: react-native-pdf+6.6.2.patch

Cheers!