From 7032a640e7eb661e3be45a494e7311191c329ced Mon Sep 17 00:00:00 2001 From: Nick Lockwood Date: Fri, 26 Feb 2016 08:19:40 -0800 Subject: [PATCH] Fix WebView example on iOS Summary: Fixed broken scaling logic in Webview example for iOS. Pages must be reloaded after toggling `scalesPageToFit`, but that wasn't happening. Reviewed By: javache Differential Revision: D2982371 fb-gh-sync-id: 8442609179bfe9ade10d1d0bac1807e4a8855d00 shipit-source-id: 8442609179bfe9ade10d1d0bac1807e4a8855d00 --- Examples/UIExplorer/WebViewExample.js | 20 ++++++++++---------- React/Views/RCTWebView.h | 1 + React/Views/RCTWebView.m | 13 +++++++++++++ React/Views/RCTWebViewManager.m | 2 +- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/Examples/UIExplorer/WebViewExample.js b/Examples/UIExplorer/WebViewExample.js index 6654551ad..1b5f836df 100644 --- a/Examples/UIExplorer/WebViewExample.js +++ b/Examples/UIExplorer/WebViewExample.js @@ -163,7 +163,7 @@ var WebViewExample = React.createClass({ var Button = React.createClass({ _handlePress: function() { - if (this.props.enabled && this.props.onPress) { + if (this.props.enabled !== false && this.props.onPress) { this.props.onPress(); } }, @@ -182,19 +182,19 @@ var ScaledWebView = React.createClass({ getInitialState: function() { return { - scalingEnabled: true + scalingEnabled: true, } }, render: function() { return ( - + @@ -307,7 +307,7 @@ const HTML = ` Hello Static World - +