html5 - chrome goes back 2 times instead of one time when using history.pushState/location.hash -
open new tab in chrome (opens http://google.com example)
open
testpage.htm
containinghistory.pushstate({},"test","#lightbox");
changes urltestpage.htm#lightbox
if hit button of chrome url changed
http://google.com
, 2 states back, not one
firefox , msie10 work both good, it's chrome issue how can fix this? there workaround?
thank in advance
(feel free give question better title , feel free correct english)
notes:
on step 2 can use window.location.hash = "#lightbox"
same issue
on step 3 can simulate button within code, using history.back()
, in case url switched correct 1 testpage.htm
, related button of chrome's gui
i tried
window.addeventlistener("popstate", function(ev){ ev.preventdefault(); }); window.addeventlistener("hashchange", function(ev){ ev.preventdefault(); });
without success :(
update 2: same using history.js
Comments
Post a Comment