WICG / visual-viewport

A proposal to add explicit APIs to the Web for querying and setting the visual viewport
https://wicg.github.io/visual-viewport/
MIT License
177 stars 28 forks source link

window.visualViewport.height is not correct on Safari IOS15 #78

Closed chongruei closed 2 years ago

chongruei commented 3 years ago

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.

205g0 commented 3 years ago

in my case window.visualViewport.height on iOS doesn't change at all, e.g., when the keyboard opens

karlcow commented 3 years ago

Is it related to https://bugs.webkit.org/show_bug.cgi?id=229876

bokand commented 2 years ago

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.

whatwg6 commented 2 years ago
 window.visualViewport.addEventListener("resize", resizeHandler)