#Navigating doesn't scroll back to top page

1 messages · Page 1 of 1 (latest)

stiff heath
#

I have a weird "featured" behavior where if I'm reading a page and currently scrolled to the bottom, navigating links will replace the page with new content, but won't scroll up. If I completely refresh the page, then my scroll will be at the top. Anyone encountered this before?

My best guess is it has something to do with my layout by having my content exist inside a sidebar as a child, but I'm wondering if there's an easy <Link to= _top> option I could simply use instead

drowsy stirrup
#

do you have overflow:hidden in your body or html in your css or setup?

brittle rivet
#

I had this too. I got around it by adding a useEffect with window.scrollTo(0, 0). Not sure if this is best practice, but it works.

stiff heath
drowsy stirrup
#

try remove it and see

stiff heath