flatiron / director

a tiny and isomorphic URL router for JavaScript

Home Page:http://github.com/flatiron/director

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Router initialisation with / adds a history entry in FF

sennett opened this issue · comments

Using this to initialise a router:

var router = new Router();
router.init('/');

This appends #/ to the URL.

Loading a page with this script in a new tab with Chrome does not generate a new entry in the history (expected IMO). The back button goes to the new tab page.

But doing in with Firefox 37.0.2 creates a new history entry, and I have to press back twice to get back to the new tab page.

I reproduced here: http://output.jsbin.com/tejahudike/2 (editable here: http://jsbin.com/tejahudike/2/edit).

Formal reproduction:

  1. Open a new tab in FF
  2. Load URL http://output.jsbin.com/tejahudike/2
  3. Press the back button
    • expected: firefox goes back to previous page - "we are on the page" is not visible - this is the behaviour in Chome
    • actual: firefox goes back to the same page (removes # URL frangment)