mnutt / davros

Personal file storage server
Apache License 2.0
298 stars 35 forks source link

Startup `history.pushState()` should be `history.replaceState()` #61

Closed kentonv closed 8 years ago

kentonv commented 8 years ago

Steps to reproduce:

  1. Open or create a Davros grain.
  2. Click "back" in the browser.

Expected result: Goes back to grain list.

Actual result: Goes back to "loading" animation in Davros and then immediately forward again. Repeated clicks simply repeat this sequence.

Comments: There is a window.history.pushState() occurring shortly after initial page load that ought to be a replaceState() instead.

mnutt commented 8 years ago

I've run into this before, thanks for flagging it. When you visit / it redirects to /files/ for consistency, but it ends up breaking the back button. replaceState() should make the back button work as expected.

mnutt commented 8 years ago

Fixed with https://github.com/mnutt/davros/commit/1252d43b710983f30e61bca5df39b35b1cdd7436.