-
Notifications
You must be signed in to change notification settings - Fork 858
Back button doesn't work in Firefox when using the dataURL feature #26
Comments
@robertpateii - I think I know what's happening here. Smooth Scroll moves the user to the anchor target, and then updates the hash. If you click the back button to the unhashed URL, as far as Firefox is concerned, the starting position is at the current anchor, since that was it's last position before the has was updated. In other words, your original fix, using |
@robertpateii - this has been fixed in version 2.18. Turns out that |
I was excited to read your comment, but when I tested it I found that now it's broken in Chrome. :( Adding onpopstate back fixes it Chrome and doesn't hurt Firefox.
|
What the ---! Done. Thanks for the catch, @robertpateii. |
Hello again,
Works fine in Chrome, but the old broken behavior is back in Firefox and IE. This happens:
This may actually turn out to be "by design" since at the end of those steps you are at your last position on the page reflected by the URL bar. That it works like I want it in Chrome is probably a Chrome bug.
I think I could fix this by adding the onpopstate from #18 back, but I don't have time to do appropriate testing tonight. I also want to think about other scenarios besides my personal site in which "fixing" this may cause problems. I'll try to figure it out this weekend.
Thanks,
Robert
p.s.
I think this is unrelated, but I should also remove the check for
history.pushState
inupdateURL()
since that function no longer callshistory.pushState
as of version 2.17.The text was updated successfully, but these errors were encountered: