elm / package.elm-lang.org

website for browsing packages and exploring documentation
https://package.elm-lang.org/
BSD 3-Clause "New" or "Revised" License
293 stars 113 forks source link

URL and page shown can get out of sync #274

Open reiner-dolp opened 6 years ago

reiner-dolp commented 6 years ago

Observed Behaviour: Interacting with the navigation bar breaks the back button.

Steps to Reproduce:

  1. Visit a page, e.g. https://package.elm-lang.org/packages/evancz/url-parser/
  2. Click on the link "2.0.1". The URL changes to https://package.elm-lang.org/packages/evancz/url-parser/2.0.1/
  3. Click into the URL bar. Press enter. The page reloads. The URL is still at https://package.elm-lang.org/packages/evancz/url-parser/2.0.1/ and the correct page is shown.
  4. (Repeat step 3 zero or more times.)
  5. Now press the back-button. The URL changes to https://package.elm-lang.org/packages/evancz/url-parser/, but the actual content shown is https://package.elm-lang.org/packages/evancz/url-parser/2.0.1/

Expected Expected: After step 5 https://package.elm-lang.org/packages/evancz/url-parser/ is shown.

System Information: Firefox 61.0.2 (64-bit) on Linux

evancz commented 5 years ago

I am unable to reproduce this on Chrome 68.0.3440.106 (Official Build) (64-bit) on Mac.

Can you try to find other users who can confirm that they see this on their machines?

bobwhitelock commented 5 years ago

For what it's worth: I can't reproduce this on Chrome 66.0.3359.117 (Official Build) (64-bit), but I can on Firefox 61.0.2 (64-bit), both on Linux, so possibly this is Firefox-related.

reiner-dolp commented 5 years ago

I can also reproduce the issue on Firefox 61.0.2 on Android. But not on Chrome on Android.

I can also reproduce the issue in my closed source elm Browser.application, which manipulates the history without hashes like https://package.elm-lang.org does. I can however not reproduce the issue using the elm-spa-example which uses fragment identifiers. (Since you cannot reload the page by selecting the navigation bar and pressing enter. Reloading with F5 does not trigger the bug.)

So this issue is most likely incorrectly filled. It's probably either a bug in Browser.application or a bug in firefox.

evancz commented 5 years ago

Can folks figure out if there is anything in Firefox issues about this?