You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/01/24 19:41:51 UTC

[1/3] ios commit: Fix InAppBrowser on iOS 5.

Fix InAppBrowser on iOS 5.

We were calling an iOS 6-only method during initialization.


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/70dad320
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/70dad320
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/70dad320

Branch: refs/heads/master
Commit: 70dad320987430795881764db7b22cc10ac2134e
Parents: 41955f9
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Jan 24 13:36:45 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Jan 24 13:37:44 2013 -0500

----------------------------------------------------------------------
 CordovaLib/Classes/CDVInAppBrowser.m |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/70dad320/CordovaLib/Classes/CDVInAppBrowser.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVInAppBrowser.m b/CordovaLib/Classes/CDVInAppBrowser.m
index 6d7b770..5be3769 100644
--- a/CordovaLib/Classes/CDVInAppBrowser.m
+++ b/CordovaLib/Classes/CDVInAppBrowser.m
@@ -130,8 +130,10 @@
     self.inAppBrowserViewController.webView.scalesPageToFit = browserOptions.enableviewportscale;
     self.inAppBrowserViewController.webView.mediaPlaybackRequiresUserAction = browserOptions.mediaplaybackrequiresuseraction;
     self.inAppBrowserViewController.webView.allowsInlineMediaPlayback = browserOptions.allowinlinemediaplayback;
-    self.inAppBrowserViewController.webView.keyboardDisplayRequiresUserAction = browserOptions.keyboarddisplayrequiresuseraction;
-    self.inAppBrowserViewController.webView.suppressesIncrementalRendering = browserOptions.suppressesincrementalrendering;
+    if (IsAtLeastiOSVersion(@"6.0")) {
+        self.inAppBrowserViewController.webView.keyboardDisplayRequiresUserAction = browserOptions.keyboarddisplayrequiresuseraction;
+        self.inAppBrowserViewController.webView.suppressesIncrementalRendering = browserOptions.suppressesincrementalrendering;
+    }
 
     if (self.viewController.modalViewController != self.inAppBrowserViewController) {
         [self.viewController presentModalViewController:self.inAppBrowserViewController animated:YES];