[Webkit-unassigned] [Bug 210009] New: window.innerHeight is broken in WKWebView with viewport-fit=cover
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Apr 4 13:01:53 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=210009
Bug ID: 210009
Summary: window.innerHeight is broken in WKWebView with
viewport-fit=cover
Product: WebKit
Version: WebKit Local Build
Hardware: iPhone / iPad
OS: iOS 13
Status: NEW
Severity: Normal
Priority: P2
Component: New Bugs
Assignee: webkit-unassigned at lists.webkit.org
Reporter: evangun2001 at yahoo.fr
When `viewport-fit=cover` is used in Cordova with the WKWebView plugin, `window.innerHeight` reports a wrong value.
Instead of reporting the proper window height, it reports the window height MINUS the safe areas insets.
Even a minimalistic snippet will demonstrate the issue: https://gist.github.com/louisameline/d5ae03b07db8185051346b8da55a2704
The issue happens only if the content of the page is smaller in height than the window height.
Exemple: if my iPhone window is 812px high, and the "natural height" of my page is 500, `window.innerHeight` returns 734 (= 812 - 44 top safe area inset - 34 bottom safe area inset). If my page content is 750px high, `window.innerHeight` returns 750, and if my page content overflows the window, `window.innerHeight` returns 812.
Additional notes:
- The `window.innerHeight` value is not longer false after a rotation of the screen
- The bug does not happen in Chrome, Safari, UIWebView, Ionic WKWebView, Capacitor
- It was previously brought to the Cordova team, who suggested to report it here: https://github.com/apache/cordova-plugin-wkwebview-engine/issues/108
Thanks
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200404/59b79c1c/attachment.htm>
More information about the webkit-unassigned
mailing list