Closed nevar closed 11 years ago
When using my library, the event will not fire popstate in Chorme at first boot.
You can use http://jsfiddle.net/PJYg5/5/
But this fire popstate, because pushState reset initialFire.
If I open http://jsfiddle.net/PJYg5/5/ in console have:
pushState
popstate
Yes, you right... Now I will correct it
fixed
Thanks. Now it work as expected.
Hi,
I have an issue that happens because the initialFire is not reset. If I revert the change from this ticket it is working again. After loading the page, I do a pushState, and a 'browser-back', and the popState doesn't fire because the initialFire still held the original value.
I'm loading history.js via requirejs, so the dom has already been loaded. Because of this, the 'load' and 'timeout' that should reset the initialFire are not executed. Maybe there should also be a domReady check, that resets when the document was ready before history was loaded?
ThaNarie, You're right, there is a problem. And it will be fixed in the new version of the library, which very soon will have the status of the release.
Chromium Version 24.0.1312.68 (180326)
http://jsfiddle.net/PJYg5/9/
http://jsfiddle.net/PJYg5/8/
Is it correct behaviour? so mean I can't initialize state on page load?