React native web view zooms webpage on iOS.. works fine on android...

See original GitHub issue

I am using WebView of react native to display a web page. It show correctly on android mobile. But it gets zoomed unnecessarily on iOS. I have this meta data added to the site url which webview is loading. <meta name="viewport" content="width=device-width, initial-scale=1.0"> Still No Idea what’s causing the issue.

It’s opening quite well and correctly when I open the link in Safari browser of the same mobile

Environment: OS: macOS High Sierra 10.13.4 Node: 9.4.0 Yarn: 1.3.2 npm: 5.6.0 Watchman: 4.9.0 Xcode: Xcode 9.3 Build version 9E145 Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed) react: 16.2.0 => 16.2.0 react-native: 0.53.2 => 0.53.2

Steps to Reproduce

  1. Load this url: http://v4.vaave.net/albums.dz into react-native WebView component
  2. Check the result on android and ios. On iOS you can observe the view is zoomed The code is import {WebView as NativeWebView} from “react-native”;

<NativeWebView startInLoadingState scalesPageToFit source={{ uri: this.props.url }} ref={webview => { this.myWebView = webview; }} />

Expected Behavior

  1. It should not be zoomed on both iOS and android It’s opening quite well and correctly when I open the link in Safari browser of the same mobile like in the below screenshot which is actually a screenshot of android mobile

This One

screenshot_20180427-161544

Actual Behavior

It is getting zoomed image uploaded from ios

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
Feng999commented, Jun 14, 2018

try to modify ‘scalesPageToFit’ of webview.

3reactions
sarathvad1811commented, Apr 27, 2018

Yes the issue is on latest 0.55 too

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webview on iOS looks like zoomed in - react native
Currently i'm working with simple RN application, which just show web page in WebView component. On android devices it works pretty good, ...
Read more >
WebView Zoom | Voters - React Native - Canny
Currently interested in this ability/feature as well for support on iOS, as zoom appears to work for android just fine without any problems....
Read more >
Zoom Video SDK for React Native - Zoom App Marketplace
It provides high level components, classes, and utilities to incorporate Zoom Video SDK features into your React Native iOS and Android apps.
Read more >
React-native webview turn off zoom
How to disable zoom on react-native web-view ,is there a property like hasZoom= {false} (just an example) ... It has to be working...
Read more >
Accessibility - React Native
Both Android and iOS provide APIs for integrating apps with ... When a view is marked as accessible, it is a good practice...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found