public-roadmap icon indicating copy to clipboard operation
public-roadmap copied to clipboard

[UX] Documentation page doesn't scroll to the top after changing pages

Open ishiharaf opened this issue 2 years ago • 0 comments

When going between documentation pages the scroll bar keeps its position instead of going back to the top of the page sometimes.

Steps to reproduce

  • Go to https://serpapi.com/related-questions
  • Scroll to the middle of the page
  • Click on Related Searches (https://serpapi.com/related-searches)
  • The page doesn't scroll back to the top. Related Searches is a bit longer, so it's not exactly in the middle.

It happens with pages of similar height, or from a shorter page to a taller page

  • e.g.: From https://serpapi.com/things-to-know to https://serpapi.com/related-questions
  • e.g.: From https://serpapi.com/scholarly-articles to https://serpapi.com/related-questions

It doesn't happen the other way around (taller pages to shorter pages), and it doesn't happen when copy & pasting URLs in the address bar. Just when clicking on the sidebar.

OS: Windows 11 23H2 Browsers: Chrome 123.0.6312.123 (64-bit) and Firefox 124.0.2 (64-bit)

ishiharaf avatar Apr 18 '24 13:04 ishiharaf