Bug 265578 - Visual viewport height updated late when Safari UI is expanded
Summary: Visual viewport height updated late when Safari UI is expanded
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 17
Hardware: iPhone / iPad All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-30 06:29 PST by Bruno Stasse
Modified: 2023-12-12 04:52 PST (History)
6 users (show)

See Also:


Attachments
testcase (942 bytes, text/html)
2023-11-30 06:29 PST, Bruno Stasse
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Stasse 2023-11-30 06:29:04 PST
Created attachment 468822 [details]
testcase

In iOS Safari, if the browser UI is expanded, when focusing an input causing the appearance of the virtual keyboard, the visual viewport only gets resized at the end of the virtual keyboard opening/closing animation.

When Safari's UI is collapsed (as a result of scrolling or when the user goes into settings and selects "Hide Toolbar"), or when it is absent (i.e. when the page has been installed with "Add to Home Screen", the visual viewport gets resized immediately after focusing the input, as expected.

Steps to reproduce:

- open the test case in Safari iOS
- make sure the browser UI is expanded
- tap the input
- notice the visual viewport height displayed only gets updated at the end of the keyboard opening animation

- tap "Done" in the virtual keyboard
- notice the visual viewport height displayed only gets updated at the end of the keyboard closing animation

It is expected that the visual viewport height gets updated and the resize event on visualViewport fires right away when the virtual keyboard starts opening/closing in all situations.
Comment 1 Radar WebKit Bug Importer 2023-11-30 13:06:34 PST
<rdar://problem/118999803>
Comment 2 Bruno Stasse 2023-12-12 04:52:06 PST
Additional information: the delay is only present when Safari's address bar is positioned at the bottom, not when it is positioned at the top.