Skip to content

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

Open

Description

@nitingupta95

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.

Activity

  1. RahulHarihar commented on Sep 8, 2025

    @RahulHarihar

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

  2. VishalDevx commented on Sep 19, 2025

    @VishalDevx

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions