code
code copied to clipboard
Position and sorting of content is reset after going back to search results
Describe the bug
After watching a mod/ressourcepack/... and then going back, the order and position of all Minecraft is reset but the page number on which you were before is still the same
Steps to reproduce
- Browse a mod pack
- Set the button next to "Sort by:" to any except "Relevance"
- Scroll down to the last entry
- Click on it
- Go back to search results. After "Sort by:" is "Relevance" and you're at the top of the page
Expected behavior
When you come back everything is as you left it
System information
Windows 11, Modrinth 0.6.3
Additional context
No response
Likely caused by the scrollBehavior chosen here: https://github.com/modrinth/theseus/blob/3ff0ff238a4360960a8fee26d45094f92c8fefc5/theseus_gui/src/routes.js#L140C1-L143C5
Not sure why top: 0 was chosen, but this appears to be intended behavior - although I agree that it should be changed in this case. Could change the global behavior (probably the wrong thing to do), or could filter based on routes relevant to the mod pack screen (probably the right thing to do, since this was an intentional change in #127). Maybe @Geometrically could give some insight.
Related to #481