immich icon indicating copy to clipboard operation
immich copied to clipboard

feat(web): persist scroll position when navigating back to album page

Open caburum opened this issue 7 months ago • 11 comments

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

caburum avatar Jul 27 '24 00:07 caburum