Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIGRATED: Pinch-to-Zoom doesn't work without setting scalesPageToFit={true} explicitly on WebView component. (#17005) #12

Closed
jamonholmgren opened this issue Sep 10, 2018 · 3 comments
Labels
migrated Migrated from https://github.com/facebook/react-native/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+ User: minimal repro Need to publish a minimal app demonstrating this behavior

Comments

@jamonholmgren
Copy link
Member

Migrated from facebook/react-native#17005.

@ewhitebloom says:


Environment
Steps to Reproduce
(Write your steps here:)

Make a WebView Component
Set the source attribute to have a uri value of a PDF.
You'll notice that you can't pinch-to-zoom without explicitly setting scalesPageToFit={true}. Even though the docs say that it is set to true by default, it appears it is not.
Expected Behavior
The pinch-to-zoom behavior should be there without setting scalesPageToFit equal to true, explicitly.

Actual Behavior
Pinch-to-zoom doesn't work without setting the scalesPageToFit explicitly.


More info in original thread

@jamonholmgren jamonholmgren added the migrated Migrated from https://github.com/facebook/react-native/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+ label Sep 10, 2018
@jamonholmgren
Copy link
Member Author

@ewhitebloom Would you mind providing a minimal repro for this and/or a PR? Thank you!

@jamonholmgren jamonholmgren added the User: minimal repro Need to publish a minimal app demonstrating this behavior label Nov 19, 2018
@Salakar
Copy link
Collaborator

Salakar commented Mar 29, 2019

@ewhitebloom I'll go ahead and close this issue given that there's been no further activity for a few months. If you want this re-opened please let me know.

@kaushal9678
Copy link

Put Webview outside of ScrollView because Webview is a subclass of ScrollView. It will work.

TheAlmightyBob pushed a commit to TheAlmightyBob/react-native-webview that referenced this issue Oct 15, 2022
…bView in view hierarchy

* add support to reuse instance with webViewKey

* change up

* address comments related to layout params

* add nullability checks

* fix

* get full stack trace

* add secondary map

* rename to ifHasInternalWebView

* additional fixes

* fix

* fix boolean

[android] add messaging passing without a react tag (react-native-webview#12)

This PR adds messaging passing. This was much simpler to do than the iOS counter part. This is the analogue to the following PR: discord#6. I've followed the same test plan. The sample app was really nice to use when testing.

In the previous PR discord#11, I broke all native->react-native communication since events were being passed by the `InternalWebView` viewId not the `RNCWebView` viewId. This is now fixed.

[android] check source prop if changed (react-native-webview#14)

* [android] check source prop if changed

* detect if new source is null too
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
migrated Migrated from https://github.com/facebook/react-native/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+ User: minimal repro Need to publish a minimal app demonstrating this behavior
Projects
None yet
Development

No branches or pull requests

3 participants