cms icon indicating copy to clipboard operation
cms copied to clipboard

fix(scroll): Maintain scroll position while navigating through pages

Open Mackhack0705 opened this issue 8 months ago • 0 comments

###Title

  • fix(scroll): Maintain scroll position while navigating through pages

Description

  • Saves scroll position to sessionStorage on route change in 'saveScrollPosition' function
  • Save scroll position as per the current path url
  • Restores position on come from the route in 'useEffect'
  • Adds cleanup for sessionStorage

Related Issue

Fixes #1735

Testing

  • Tested navigation between pages in Chrome
  • Verified that scroll position is preserved after back/forward navigation

Mackhack0705 avatar Apr 05 '25 09:04 Mackhack0705