cms
cms copied to clipboard
fix(scroll): Maintain scroll position while navigating through pages
###Title
- fix(scroll): Maintain scroll position while navigating through pages
Description
- Saves scroll position to
sessionStorageon 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