browserstate / history.js

History.js gracefully supports the HTML5 History/State APIs (pushState, replaceState, onPopState) in all browsers. Including continued support for data, titles, replaceState. Supports jQuery, MooTools and Prototype. For HTML5 browsers this means that you can modify the URL directly, without needing to use hashes anymore. For HTML4 browsers it will revert back to using the old onhashchange functionality.
http://browserstate.github.com/history.js/demo/
Other
10.75k stars 1.35k forks source link

"statechange" event firing multiple times in Chrome #95

Closed mjadobson closed 13 years ago

mjadobson commented 13 years ago

First came across this on my project, but it also applies to the demo-site: http://balupton.github.com/history.js/demo/?state=1

Using the back or forward buttons causes multiple "statechange" events in Chrome 14beta. (Check the console)

It seems to be aggregating all of the statechanges every time the event fires..

Also tested in Firefox, and this bug does not occur there.

Doubt it's relevant, but my machine's running OSX Leopard (10.5).

mtcmorris commented 13 years ago

Happens under Lion also

VictorBlomberg commented 13 years ago

Confirmed in Chrome (14.0.835.159) on Windows 7.

alexdunae commented 13 years ago

And in Chrome 15.0.874.15 dev on Snow Leopard.

cwholt commented 13 years ago

also happening here, same browser/os as alexdunae.

balupton commented 13 years ago

Can someone confirm this is fixed in v1.7.1?

brianfegan commented 12 years ago

its still happening for me in chrome 14.0.835.202 on windows 7

wilsonpage commented 12 years ago

I can confirm this bug in Chrome 15.0.874.102

I have had the same issues in my app using the BackboneJS routing features. I wrote about it: http://wilsonpage.tumblr.com/post/12072434026/chrome-and-html5-pushstate

michaelsauter commented 12 years ago

I was just fighting with this for a couple of hours until I found this: http://code.google.com/p/chromium/issues/detail?id=97934. Seems the problem is not that the event is fired multiple times, but that the console has a bug ...