balupton/history.js — Issue #140: Chrome seems to fire statechange twice on the two first back/forward calls
Author: Mick-Hansen
Created: 2011-12-23 00:03:42+00:00
State: open

Works as expected in Firefox.

But in chrome when you use pushState, and then use the browser back in Chrome it seems to call both the previous statechange and the new one. Quite annoying if you have ajax events tied to this.

Seems to happen on the History.js demo aswell:
Clicking first button and then back results in the following console.log:

initial: [Object, "", "http://balupton.github.com/history.js/demo/"]
statechange: [Object, "State 1", "http://balupton.github.com/history.js/demo/?state=1"]
initial: [Object, "", "http://balupton.github.com/history.js/demo/"]
statechange: [Object, "State 1", "http://balupton.github.com/history.js/demo/?state=1"]
statechange: [Object, "", "http://balupton.github.com/history.js/demo/"]

Chrome 15.0.874.121 on Ubuntu