Closed chongruei closed 2 years ago
in my case window.visualViewport.height
on iOS doesn't change at all, e.g., when the keyboard opens
Is it related to https://bugs.webkit.org/show_bug.cgi?id=229876
This is a WebKit/Safari issue - the VisualViewport spec doesn't dictate which UI should cause a resize in the visual viewport (vs. overlaying it silently) so this is UA dependent.
window.visualViewport.addEventListener("resize", resizeHandler)
Since the IOS15 release, the address bar is a move to the bottom position. And I tested with some scenarios like the keyboard is visible. Then the window.visualViewport.height is not pretty accurate.