[
https://issues.apache.org/jira/browse/CB-13987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16467016#comment-16467016
]
ASF GitHub Bot commented on CB-13987:
-------------------------------------
shazron closed pull request #45: CB-13987: (ios) Fix WKWebView doesn't layout
properly at launch on iP…
URL: https://github.com/apache/cordova-plugin-wkwebview-engine/pull/45
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/src/ios/CDVWKWebViewEngine.m b/src/ios/CDVWKWebViewEngine.m
index e359b04..e6778c8 100644
--- a/src/ios/CDVWKWebViewEngine.m
+++ b/src/ios/CDVWKWebViewEngine.m
@@ -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;
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> WKWebView doesn't layout properly at launch on iPhone X
> -------------------------------------------------------
>
> Key: CB-13987
> URL: https://issues.apache.org/jira/browse/CB-13987
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-ios
> Affects Versions: [email protected]
> Environment: Mac
> Cordova 8.0.0
> codova-plugin-wkwebview-engine 1.1.4
> Reporter: Kamal Kalra
> Assignee: Suraj Pindoria
> Priority: Major
> Attachments: TestApp2.zip
>
>
> WKWebView doesn't seem to layout properly at launch. There is a black bar at
> the bottom of the view. If I rotate the app to landscape mode, the view
> automatically resizes correctly and occupies the entire screen. Then when I
> rotate back to portrait mode, it works correctly and occupies the entire
> screen as expected. But at launch this is not happening. It should occupy
> the entire screen at that point without having to rotate back and forth.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]