modrinth / code

The Modrinth monorepo containing all code which powers Modrinth!
https://modrinth.com
Other
963 stars 178 forks source link

Retain scroll placement when returning back to Browsing #481

Open Nanoattack opened 1 year ago

Nanoattack commented 1 year ago

Is your suggested enhancement related to a problem? Please describe.

No response

Describe the solution you'd like

When browsing for mods/etc to view its description/versions/gallery, would be nice QoL if, backing out from the specific page could keep the scroll position.

Visual Explanation:

Scroll is roughly 60%~ image

Specific page is opened image

Backing out resets it to 0% scroll image

Additional context

Makes searching through content faster and more streamlined!

Norbiros commented 4 months ago

We have a custom inner element with scrolling, so Vue's router built-in system won't work (see https://github.com/vuejs/vue-router/issues/1187). We can either create a custom solution or wait for Vue to address this problem.