Scroll position should be restored when going back from viewing photo

Note that I’m not sure if this is a bug or just a missing feature.

Expected Behavior

Going to /tag/When/2011, scrolling down, clicking a photo, then clicking back (either the browser’s native back button, a back mouse button, or the back button in PhotoStructure’s UI itself) should restore the scroll position.

Current Behavior

Going back from a photo to gallery view (/tag/When/2011 for example) goes back to the top of the page

Steps to Reproduce

As above.


Operating system and version: Unraid 6.11.x

PhotoStructure edition: PhotoStructure for Docker

This is totally a bug.

I actually had it fixed with a prior build, but some combination of new versions of vue and vue-router resulted in the prior fix being broken.

I suspect it may require me to render the asset view as an “overlay” so I can maintain the prior page state (that being the tag or search result scroll position) without it reloading.

Thanks for reporting!

1 Like

I have been experiencing this too. It’s my top (and only?) annoyance with PS web UI.

The problem is made worse by the thumbnails being loaded lazily (“Load more…” on scroll):

  1. Scroll down a view
  2. Click on a thumbnail
  3. Click back
  4. Scroll all the way down again

# 4 really breaks the flow!

I hope the fix for this gets the priority treatment once you are done with the new alpha :slight_smile:

Agreed, this is super irritating. I normally just middle-click thumbs to open new tabs to work around this issue.

I’ve tried a couple approaches with vue-router to prevent the re-rendering of the page when hitting the back button, and I swear it worked in a v2.x build at one point, but after browser and code updates, it’s misbehaving again.

I think the approach I’ll have to take is a DOM element that overlays the full screen, on top of the tag gallery, so the back button just deletes the dom element, and you’re back at the right place in the tag gallery (because it was there all the time).

It’s certainly less efficient for the browser, but it should be a permanent fix.

I feel that pain @mrm … Been there myself a bunch of times :slight_smile: