-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
We set viewport scrollTop to adjust scroll due to size changes. However browser history scroll restoration api can also adjust scroll positions and mess up with our efforts to avoid page jump.
scroll positions are stored and then, more importantly, restored whenever you traverse the history. This often means unsightly jumps as the scroll position changes automatically, and especially so if your app does transitions, or changes the contents of the page in any way. Ultimately this leads to an horrible user experience.
from https://developers.google.com/web/updates/2015/09/history-api-scroll-restoration
As @dvoytenko suggested we can set history.scrollRestoration to manual. However I can't find where we are taking ownership of setting scroll position when traverse history. Is it safe to add history.scrollRestoration = 'manual'?
@dvoytenko