Open signorekai opened 3 months ago
Does the resize plugin (x-resize) have the same issue?
Yes it does.
(from iOS inspector)
As the user scrolls and the browser starts to hide the address bar, the resize
event for window.visualViewport
gets called almost immediately while the x-resize
only gets called at the end of the scroll (after easing).
Interesting.
Could this be an issue where the listener should be passive or you risk causing issues?
Problem
On iOS Safari (v17.3),
resize
events onwindow
does not fire immediately to viewport resizes (caused by browser chrome hiding address bars). However, it does fire almost immediately when binded towindow.visualViewport
.Solution
Added
.viewport
modifier tox-on
directive to add listeners towindow.visualViewport