Bug 259902
| Summary: | visualViewport.height returns incorrect value after closing virtual keyboard and rotating screen in web app mode | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Yuwei <yuweih> |
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | bfulgham, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh, zalan, zud |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 16 | ||
| Hardware: | iPhone / iPad | ||
| OS: | iOS 16 | ||
Yuwei
Repro:
1. Visit https://ywh233.github.io/ on mobile Safari
2. Add site to home screen
3. Open the added web app
4. Click `iOS rotation repro` from the link
5. Rotate to landscape mode
6. Tap the textarea
7. Tap `Done` on the virtual keyboard to close it
8. Rotate to portrait mode
Expected:
The shown visual viewport size should be 390x797, i.e. matching the size of the layout viewport
Actual:
The shown visual viewport size is 390x343, which is smaller than the layout viewport. The virtual keyboard isn't open, so this is an unexpected value.
---
This seems to be only reproducible in web app mode. I was not able to repro it on mobile Safari. Also I had to open and close the virtual keyboard to trigger the bug. Simply rotating the screen back-and-forth didn't trigger it.
Source code for repro: https://github.com/ywh233/ywh233.github.io/blob/main/ios_rotation_repro.html
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/113524249>