cms icon indicating copy to clipboard operation
cms copied to clipboard

added scroll restoration on forward/backward navigation

Open KitsuneKode opened this issue 6 months ago • 1 comments

PR Fixes:

  • 1 Added Scroll restoration to contents

The course content page scrolls to the top on navigation(backward/forward). Scrolling through the same weeks of content again and again to find the video/week is just straight up annoying. This PR fixes it, restores back to the point before navigation.

Checklist before requesting a review

  • [x ] I have performed a self-review of my code
  • [x ] I assure there is no similar/duplicate pull request regarding same issue

KitsuneKode avatar Aug 16 '25 00:08 KitsuneKode

@KitsuneKode

  • isn't ref logic redundant?
  • also is there any use of { scroll: false } as we're using window.scrollTo logic in useEffect anyway? it seemed to work fine w/o them too..

tarun-katal avatar Sep 12 '25 14:09 tarun-katal