From 4a4f51d90b24f7712b5ead131afb770c4e3959ff Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Thu, 16 Apr 2020 20:42:16 +0200 Subject: [PATCH 1/2] fix(ios): prevent statusbar rotation after closing InAppBrowser --- src/ios/CDVWKInAppBrowser.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ios/CDVWKInAppBrowser.m b/src/ios/CDVWKInAppBrowser.m index 88ef182fa..db22b50bb 100644 --- a/src/ios/CDVWKInAppBrowser.m +++ b/src/ios/CDVWKInAppBrowser.m @@ -677,7 +677,8 @@ - (void)browserExit // Set tmpWindow to hidden to make main webview responsive to touch again // Based on https://stackoverflow.com/questions/4544489/how-to-remove-a-uiwindow self->tmpWindow.hidden = YES; - + self->tmpWindow = nil; + if (IsAtLeastiOSVersion(@"7.0")) { if (_previousStatusBarStyle != -1) { [[UIApplication sharedApplication] setStatusBarStyle:_previousStatusBarStyle]; From ec5e5768c11236e6b1ec76fdce62d0309cafa464 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Sun, 19 Apr 2020 16:15:49 +0200 Subject: [PATCH 2/2] set tmpWindow to nil on hide too --- src/ios/CDVWKInAppBrowser.m | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ios/CDVWKInAppBrowser.m b/src/ios/CDVWKInAppBrowser.m index db22b50bb..fc5337437 100644 --- a/src/ios/CDVWKInAppBrowser.m +++ b/src/ios/CDVWKInAppBrowser.m @@ -324,6 +324,7 @@ - (void)hide:(CDVInvokedUrlCommand*)command // Set tmpWindow to hidden to make main webview responsive to touch again // https://stackoverflow.com/questions/4544489/how-to-remove-a-uiwindow self->tmpWindow.hidden = YES; + self->tmpWindow = nil; if (self.inAppBrowserViewController == nil) { NSLog(@"Tried to hide IAB after it was closed.");