immich
immich copied to clipboard
feat(web): persist scroll position when navigating back to album page
I was going to use history.state
to store the data originally, but due to the way the asset viewer writes the state and back buttons navigate directly to the page instead of using the history, I had to implement it using sessionStorage
to save the scroll location (which is cleared when leaving the group of pages).
Search page doesn't return to the exact position as I couldn't figure out where to hook the navigation properly, but now seems to at least center the clicked item instead of going to the top.
Fixes #11346