cms icon indicating copy to clipboard operation
cms copied to clipboard

bug: Scroll position resets to top after navigating back from week detail page

Open nitingupta95 opened this issue 3 months ago • 2 comments

Describe the bug

When navigating into a week’s section (e.g., Week 8 - Offline → Mongo Deep Dive) and then going back to the main course page, the page always scrolls back to the top instead of restoring the previous scroll position.

To Reproduce

  1. Go to the course page with the list of weeks (e.g., /courses/14).
  2. Scroll down to any section (e.g., Week 8).
  3. Click on the week (e.g., Week 8 - Offline).
  4. Press the browser’s back button or click back to return to the main page.
  5. Notice that the page reloads and scrolls to the top instead of staying at the previous scroll position.

Expected behavior

When going back to the main course page, it should restore the previous scroll position so the user sees the same section they were on before navigating.

Screenshots or GIFs

(Attached above)

Info

  • Browser: Chrome, Brave
  • Version: Latest stable versions (Chrome 140.x, Brave 1.72.x)

Additional context

This affects usability because users must scroll again to find their place. Implementing scroll position restoration (window.history.scrollRestoration = "manual" or saving/restoring scroll position with sessionStorage) should solve this issue.

nitingupta95 avatar Sep 06 '25 01:09 nitingupta95

Hey @nitingupta95 can I work on this? I was also experiencing the same bug, and it's really frustrating.

RahulHarihar avatar Sep 08 '25 09:09 RahulHarihar

Hello 👋 @devsargam I’m interested in fixing this issue. I’ll implement scroll restoration for the course content page to improve navigation UX. Please assign me if possible.

VishalDevx avatar Sep 19 '25 00:09 VishalDevx