A page in a React always scrolls to the top on history
navigation. I have trouble figuring out what causes the scroll-to-top.
- There is no
window.scrollTo()
that does this - There is no
.focus()
event that focuses on an element higher up and moves scroll position - The big React components do not unmount which would cause the page to be shorter, which would move scroll position
So what else is there that can cause document.documentElement.scrollTop
to be set to 0
?