fix(ios): prevent statusbar rotation after closing InAppBrowser (#672)

This commit is contained in:
jcesarmobile 2020-04-27 17:54:02 +02:00 committed by GitHub
parent cbe345689b
commit 2793e16ab4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -324,6 +324,7 @@ static CDVWKInAppBrowser* instance = nil;
// 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.");
@ -677,7 +678,8 @@ static CDVWKInAppBrowser* instance = nil;
// 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];