You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2017/01/03 23:33:04 UTC
cordova-plugin-inappbrowser git commit: CB-11136: (ios) Fix
InAppBrowser when closing with WKWebView
Repository: cordova-plugin-inappbrowser
Updated Branches:
refs/heads/master d735649fc -> f32917df3
CB-11136: (ios) Fix InAppBrowser when closing with WKWebView
This closes #187
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/f32917df
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/f32917df
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/f32917df
Branch: refs/heads/master
Commit: f32917df314f08296c53a4de0255a424be773184
Parents: d735649
Author: Manu Mtz.-Almeida <ma...@gmail.com>
Authored: Mon Sep 19 22:51:08 2016 +0200
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Jan 3 15:28:43 2017 -0800
----------------------------------------------------------------------
src/ios/CDVInAppBrowser.m | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/f32917df/src/ios/CDVInAppBrowser.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m
index 335e59c..e8aced7 100644
--- a/src/ios/CDVInAppBrowser.m
+++ b/src/ios/CDVInAppBrowser.m
@@ -239,7 +239,14 @@
// Run later to avoid the "took a long time" log message.
dispatch_async(dispatch_get_main_queue(), ^{
if (weakSelf.inAppBrowserViewController != nil) {
- [weakSelf.viewController presentViewController:nav animated:YES completion:nil];
+ CGRect frame = [[UIScreen mainScreen] bounds];
+ UIWindow *tmpWindow = [[UIWindow alloc] initWithFrame:frame];
+ UIViewController *tmpController = [[UIViewController alloc] init];
+ [tmpWindow setRootViewController:tmpController];
+ [tmpWindow setWindowLevel:UIWindowLevelAlert];
+
+ [tmpWindow makeKeyAndVisible];
+ [tmpController presentViewController:nav animated:YES completion:nil];
}
});
}
@@ -426,7 +433,7 @@
[self.commandDelegate sendPluginResult:pluginResult callbackId:scriptCallbackId];
return NO;
}
- }
+ }
//if is an app store link, let the system handle it, otherwise it fails to load it
else if ([[ url scheme] isEqualToString:@"itms-appss"] || [[ url scheme] isEqualToString:@"itms-apps"]) {
[theWebView stopLoading];
@@ -517,7 +524,7 @@
#else
_webViewDelegate = [[CDVWebViewDelegate alloc] initWithDelegate:self];
#endif
-
+
[self createViews];
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org