[Webkit-unassigned] [Bug 192564] New: Regression (iOS 12): Keyboard dismissal leaves WKWebView viewport-fit=cover content offscreen
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 10 11:58:46 PST 2018
https://bugs.webkit.org/show_bug.cgi?id=192564
Bug ID: 192564
Summary: Regression (iOS 12): Keyboard dismissal leaves
WKWebView viewport-fit=cover content offscreen
Product: WebKit
Version: Safari 12
Hardware: iPhone / iPad
OS: iOS 12
Status: NEW
Severity: Major
Priority: P2
Component: WebKit API
Assignee: webkit-unassigned at lists.webkit.org
Reporter: dvpdiner2 at gmail.com
Also filed as rdar://44655885
When an input that would require webview centering is clicked, the viewport is repositioned to center that input, as iOS has traditionally done. However, when dismissing the keyboard, the viewport is not re-positioned properly back to its original position.
A test project is available on GitHub: https://github.com/dpogue/WKScrollTest/tree/ios12-keyboard
Run the test project on a device or simulator. Tap the text input field to open the keyboard. Tap the Done button on the keyboard to dismiss it.
Expected Results:
The keyboard overlay closes and the web view is positioned as before: filling the screen.
Actual Results:
The keyboard overlay closes, but the web view does not return to its original position, leaving a space at the bottom of the screen. If rubberband bounce scrolling is disabled, it is not possible to return the web view to its intended position.
I strongly suspect this was introduced as a side effect of https://bugs.webkit.org/show_bug.cgi?id=187743 / https://trac.webkit.org/changeset/233905/webkit
This is impacting several popular frameworks that embed WKWebView:
- https://github.com/apache/cordova-ios/issues/417
- https://github.com/react-native-community/react-native-webview/issues/193
- https://github.com/ionic-team/capacitor/issues/814
Some additional comments from others:
- when the viewport is in it's "stuck" position it seems as if any web elements still respond to interaction in their proper place. They are visually off the screen, but logically in the correct spot. This is similar to https://bugs.webkit.org/show_bug.cgi?id=158325
- webView.setNeedsLayout() on keyboard dismissal works as a workaround. UI is updated correctly but instantly, not smoothly like in Safari.
It sounds like the issue is essentially that the visible content area is not getting updated when the keyboard closes and the keyboard inset is removed.
--
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/20181210/dffbf218/attachment.html>
More information about the webkit-unassigned
mailing list