Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
CB-13987: (ios) Fix WKWebView doesn't layout properly at launch on iP…
Browse files Browse the repository at this point in the history
…hone X
  • Loading branch information
shazron committed May 8, 2018
2 parents b4e2ec0 + 7684545 commit 81eeade
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ios/CDVWKWebViewEngine.m
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ - (void)pluginInitialize

// re-create WKWebView, since we need to update configuration
WKWebView* wkWebView = [[WKWebView alloc] initWithFrame:self.engineWebView.frame configuration:configuration];

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
if (@available(iOS 11.0, *)) {
[wkWebView.scrollView setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever];
}
#endif

wkWebView.UIDelegate = self.uiDelegate;
self.engineWebView = wkWebView;

Expand Down

4 comments on commit 81eeade

@xm5646
Copy link

@xm5646 xm5646 commented on 81eeade Sep 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

solved my problem.

@u01jmg3
Copy link

@u01jmg3 u01jmg3 commented on 81eeade Jul 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Can applying this new setting be overwritten?
  • What about an iPad running iOS 11 or greater that doesn't require this iPhone X display change?
  • I am having an issue with my status bar being incorrectly sized (the height is almost twice as much after I update from 1.1.4 to 1.2.0).

@janpio
Copy link
Member

@janpio janpio commented on 81eeade Jul 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please open an issue instead of commenting on a year old commit @u01jmg3 - this will get ignored here.

@u01jmg3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure: #105

Please sign in to comment.