Upon resizing the browser window I get the resize event but when checking different DOM values like scrollable height etc, the values are wrong and depict the values before the new layout.
Debouncing the resize solves the issue, but it is really unclear what's the minimal time for debouncing as it depends on page complexity.
I found these related links:
https://openradar.appspot.com/radar?id=5040881597939712
https://hackernoon.com/onresize-event-broken-in-mobile-safari-d8469027bf4d
Question is, is there any way to solve this other than debouncing by some arbitrary time?
from How to solve erroneous resize behavior of iOS devices
No comments:
Post a Comment