code icon indicating copy to clipboard operation
code copied to clipboard

Backwards navigation after downloading mod requires multiple navigations

Open Ben-Brady opened this issue 9 months ago • 0 comments

Please confirm the following.

What browsers are you seeing the problem on?

Firefox

Describe the bug

After downloading a mod, the #download and then ?version=1.21.4&loader=neoforge#download are added onto the URL. However, after completing a download this blocks backwards navigation until you navigate through these added entries.

Steps to reproduce

  1. Visit the mod listing page (https://modrinth.com/mods)
  2. Click on a mod
  3. Click the Download button
  4. Select a version or loader
  5. Close the modal
  6. Click Previous Page/Back Page button
  7. Have no navigation occur, but URL change, requires additional navigation to go back a page

Expected behavior

It seems more appropriate to use history.replaceState instead of pushing new URLs to the history. This would make it so that you only need one backwards navigation to get to the previous page.

Additionally, an additional replace to the unappended URL after closing the download modal would make it so that the URL doesn't contain the previously downloaded version. If a user wants to share a link with that specific download included, it's more likely they'll have the modal open when grabbing the link.

Additional context

Tested on Chrome as well, still occurs there

Ben-Brady avatar Mar 30 '25 03:03 Ben-Brady