Bug 198347 - Visual Viewport resize not firing when keyboard opens
Summary: Visual Viewport resize not firing when keyboard opens
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: iPhone / iPad iOS 12
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-29 13:00 PDT by Liam DeBeasi
Modified: 2019-09-26 07:40 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Liam DeBeasi 2019-05-29 13:00:08 PDT
When opening the virtual keyboard on iOS, I would expect the visual viewport height to be updated and the visual viewport resize event to be fired; however, this is not happening.

I created a CodePen to demonstrate the issue: https://s.codepen.io/liamdebeasi/debug/KLGwJN/nqkwvGNEOXNA
Here is the source code: https://codepen.io/liamdebeasi/pen/KLGwJN

Expected Behavior:
Bringing focus to the top-most input opens the keyboard, which in turn causes the visual viewport height to be updated and the visual viewport resize event to be fired.

Actual Behavior on Safari for iOS:
The visual viewport height is not updated, and the resize event is not fired.

Actual Behavior on Chrome for Android (for comparison):
The visual viewport height is updated, and the resize event is fired.

I have tested this on iOS 12.3 release and 12.4 beta 3. Additionally, I have tested this on "trunk" using a build from May 29, 2019 (I cloned the repository, compiled it, and opened my CodePen in the "iPhone for WebKit Development" iOS Simulator).

This is related to https://bugs.webkit.org/show_bug.cgi?id=193475, but this functionality does not seem to be working properly.
Comment 1 Liam DeBeasi 2019-09-26 07:40:16 PDT
Looks like this was fixed on iOS 13. Thanks!