[Webkit-unassigned] [Bug 254861] iPadOS: Viewport doesn't correctly restore after dismissing software keyboard for installed web apps

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Apr 1 11:06:32 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=254861

--- Comment #1 from ik at rejh.nl ---
A couple of other/additional observations, maybe this will help or they may be separate issues (let me know plz)

I've managed to mostly work around the issue by using the Visual Viewport API and resize the html and body via javascript. Weird thing is that I have to (re)register the listener every time the input is focused or it won't fire more than once:

1. On input focus: add a visualViewport 'resize' listener (it will fire almost immediately)

2. In the resize listener, set the height of html and body to match visualViewport.height, then scroll both to '0'.

3. On input blur: unregister the 'resize' listener and unset html and body height, then scroll both to '0'

The second thing I found out is that the document loses focus when I dismiss the keyboard using the dedicated button, at least according to the page lifecycle library I use (https://github.com/GoogleChromeLabs/page-lifecycle). This doesn't happen on iPhone, just on iPad (Mini, again, I don't have other devices to test this with). Scrolling doesn't re-focus it, I have to really tap something.

-- 
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/20230401/e9606000/attachment.htm>


More information about the webkit-unassigned mailing list