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 for debouncing as it depends on page complexity.

I found these related links:

Question is, is there any way to this other than debouncing by some arbitrary time?

Source link


Please enter your comment!
Please enter your name here