Ad

I have an tag on page 1 that is near the bottom of the page. When clicked, the next page loads, but also near the bottom.

Happens when using Safari and Chrome on Windows 10. Doesn't happen on Chrome on Mac OS.

I originally tried it without the hash for a jump to the top, but added it after to try, and it still jumps to the bottom.

If it helps, I am using react-router

Ad

Answer

Check this https://reacttraining.com/react-router/web/guides/scroll-restoration. This must solve your problem. Hope this helps :)

Ad
source: stackoverflow.com
Ad