cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gearoid M (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-13987) WKWebView doesn't layout properly at launch on iPhone X
Date Mon, 16 Apr 2018 01:19:00 GMT

    [ https://issues.apache.org/jira/browse/CB-13987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16438907#comment-16438907
] 

Gearoid M commented on CB-13987:
--------------------------------

I am also seeing this issue. The problem is that the window height is not being set correctly.
It is quite simple to reproduce. First set up a blank Cordova project, and set it up to use
the wkwebview plugin and support iPhone X.
 # cordova create test

 # cordova plugin add cordova-plugin-wkwebview-engine

 # cordova platform add ios

 # Add a storyboard splash screen to config.xml for iOS, and add viewport-fit=cover to the
viewport meta tag

 # cordova run ios

Now open up the Safari inspector. Notice that when you hover over the device's name in Safari's
develop menu, the outline of the window on the device is not the whole screen. In the inspector
console, take a look at window.innerHeight. On an iPhone X, it should be 812, but it is reported
as 734. Now, rotate the device to landscape, and back to portrait. Check window.innerHeight
again and it is now correctly shown to be 812.

> 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: cordova-ios@4.5.4
>         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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message