Skip to content

Commit 2793e16

Browse files
authored
fix(ios): prevent statusbar rotation after closing InAppBrowser (apache#672)
1 parent cbe3456 commit 2793e16

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ios/CDVWKInAppBrowser.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ - (void)hide:(CDVInvokedUrlCommand*)command
324324
// Set tmpWindow to hidden to make main webview responsive to touch again
325325
// https://stackoverflow.com/questions/4544489/how-to-remove-a-uiwindow
326326
self->tmpWindow.hidden = YES;
327+
self->tmpWindow = nil;
327328

328329
if (self.inAppBrowserViewController == nil) {
329330
NSLog(@"Tried to hide IAB after it was closed.");
@@ -677,7 +678,8 @@ - (void)browserExit
677678
// Set tmpWindow to hidden to make main webview responsive to touch again
678679
// Based on https://stackoverflow.com/questions/4544489/how-to-remove-a-uiwindow
679680
self->tmpWindow.hidden = YES;
680-
681+
self->tmpWindow = nil;
682+
681683
if (IsAtLeastiOSVersion(@"7.0")) {
682684
if (_previousStatusBarStyle != -1) {
683685
[[UIApplication sharedApplication] setStatusBarStyle:_previousStatusBarStyle];

0 commit comments

Comments
 (0)