[Feature] Restore scroll position when navigating backwards #3114
Replies: 9 comments 15 replies
-
PS if it helps, there's a script referenced in the third answer here: https://stackoverflow.com/questions/16388772/maintain-scroll-position-of-large-html-page-when-client-returns |
Beta Was this translation helpful? Give feedback.
-
A variation on this would be the addition of a "Jump to Timeline" option/button when displaying a photo from an album, search results, or map view. I've found myself searching for a photo, finding it and then wanting to look at all the photos around the same time. There doesn't seem to be an easy way to do that yet. |
Beta Was this translation helpful? Give feedback.
-
I guess this does not only apply on the timeline but also on the album view. Go to the list of albums. Scroll down. Open one. Return back to your album list. And you are back on top instead within the position as before. Pretty annoying when editing/sorting albums. It does work on the mobile app, you stay on your previous position. |
Beta Was this translation helpful? Give feedback.
-
As per #6052 (marked as duplicate of this issue) this is also desired feature when browsing people / faces |
Beta Was this translation helpful? Give feedback.
-
What browser do you use? I have noticed that issue in Firefox, Chrome works fine though. |
Beta Was this translation helpful? Give feedback.
-
It has something to do with how Immich/Firefox behaves when the photo viewer is opened. |
Beta Was this translation helpful? Give feedback.
-
I have observed that the problem are time buckets heights together with top position of the scrollbar, they change when photo viewer is closed. However this seems to be only consequence of some other issue.
|
Beta Was this translation helpful? Give feedback.
-
For me, I got from /people to e.g. /people/4711aba5-c5ba-4668-8d71-57efbf84fe8a?previousRoute=/people and then either back with the arrow on the upper left corner (immich-internal), or with the browser's "back" function |
Beta Was this translation helpful? Give feedback.
-
Which technique are we thinking to use to fix this? I had to fix it in my own project and the way I did it is basically: store state (on page load): function bindScrollState() {
// should use scrollend but not implemented on safari yet again.....
$("#lb").on("scroll", function (e) {Page.active.scroll = $(this).scrollTop()})
} load state (on page load): $("#lb").scrollTop(this.scroll) I didn't need the state to persist past refreshes, so in this case I would store the scroll state in local storage (per timeline) rather than as a class property (of timelines). Would such an approach work here? |
Beta Was this translation helpful? Give feedback.
-
The feature
Scenario: I've got tens or hundreds of thousands of photos; I'm surfing through, let's say 1967; I click on a photo and see that its part of an Album, so I go to that album. I click the back button a couple of times and... I'm in 2023. Sigh.
Or: I'm scrolling through my 100k files and I get to a section that isn't rendering. Just blank boxes for whatever reason. I know a refresh will help, so I hit the trusty F5 key and... I'm in 2023. Sigh.
Honestly I don't know if this is even possible, but thought I'd ask because it has come up at least a dozen times in the last two days :)
Cheers.
Platform
Beta Was this translation helpful? Give feedback.
All reactions