The resize event handler calls update with a 'relative' scroll. Two things happen in this case:
The 'disabled' class is added MANY times - once for every pixel of resize (see below about debouncing)
If the content size is less than the viewport size, a negative offset is added as part of the relative scroll. This causes the content to 'jump' down by the difference.
Note that it would probably also be a very good idea to 'debounce' this event handler... I wasn't sure what your preferred mechanism for that might be so I didn't include it here.
Coverage remained the same at 54.39% when pulling 7c6524564e8121cd3f915c8a6cc0accccf765f25 on crrobinson14:patch-1 into 144b13e317102c9a76123324dde3fd821fa91217 on wieringen:master.
The
resize
event handler calls update with a 'relative' scroll. Two things happen in this case:Note that it would probably also be a very good idea to 'debounce' this event handler... I wasn't sure what your preferred mechanism for that might be so I didn't include it here.