3
3
import React from "react" ;
4
4
5
5
import PropTypes from "prop-types" ;
6
-
7
- import { WebView , View , Linking , PixelRatio } from "react-native" ;
6
+ import { WebView } from "react-native-webview" ;
7
+ import { View , Linking , PixelRatio } from "react-native" ;
8
8
9
9
import BaseComponent from "./BaseComponent" ;
10
10
import Utils from "./Utils" ;
@@ -62,7 +62,6 @@ class Webbrowser extends BaseComponent {
62
62
forwardButtonEnabled : false ,
63
63
homeButtonEnabled : true ,
64
64
loading : true ,
65
- scalesPageToFit : true ,
66
65
jsCode : this . props . jsCode ,
67
66
cookie : this . props . cookie ,
68
67
WebViewHeight : 0
@@ -177,7 +176,6 @@ class Webbrowser extends BaseComponent {
177
176
</ View >
178
177
< WebView
179
178
ref = { WEBVIEW_REF }
180
- useWebKit = { true }
181
179
scrollEnabled = { this . props . toBlockPage ? false : true }
182
180
automaticallyAdjustContentInsets = { false }
183
181
style = { styles . webView }
@@ -189,8 +187,6 @@ class Webbrowser extends BaseComponent {
189
187
onNavigationStateChange = { this . onNavigationStateChange }
190
188
onShouldStartLoadWithRequest = { this . onShouldStartLoadWithRequest }
191
189
startInLoadingState = { true }
192
- // scalesPageToFit is not usable when useWebKit is set to true
193
- scalesPageToFit = { this . state . scalesPageToFit }
194
190
onLoad = { ( ) => this . refs [ WEBVIEW_REF ] . postMessage ( this . state . cookie ) }
195
191
{ ...( this . state . jsCode
196
192
? { injectedJavaScript : this . state . jsCode }
@@ -259,7 +255,6 @@ class Webbrowser extends BaseComponent {
259
255
currentUrl : navState . url ,
260
256
status : navState . title ,
261
257
loading : navState . loading ,
262
- scalesPageToFit : true
263
258
} ) ;
264
259
265
260
this . props . onNavigationStateChange ( navState ) ;
0 commit comments