[Webkit-unassigned] [Bug 85881] history not correct when performing multiple operations of altering location.hash and then location.replace
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Oct 3 16:08:55 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=85881
Henri T. <henrit at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |henrit at gmail.com
--- Comment #5 from Henri T. <henrit at gmail.com> 2013-10-03 16:07:49 PST ---
I can reproduce this bug on:
- Safari on an iPad 2 running iOS 6.1.3
- Chrome on a Galaxy Tab 2 10.1 running Android 4.1.1
- Chrome 29.0.1547.76m on windows 8 64bit
- Chrome 29.0.1547.76 on an intel mac mini running osx 10.8.4
- Safari 6.0.5 (8536.30.1) on the same osx 10.8.4 platform
I cannot reproduce this bug on:
- IE 10.0.9200.16688 on windows 8 64bit
- Firefox 24.0 on windows 8 64bit
The minimal steps to reproduce this bug are:
1. location.hash = "#a // history.length = n
2. location.hash = "#b"; // history.length = n + 1
3. location.replace("#c"); // history.length = n + 1
4. location.hash = "#b"; // history.length = n + 1 (!)
5. history.back();
// expected behavior: hash == "#c". problem behavior: hash == "#a"
In practical terms, open a web console on any web page, and paste and run this line:
location.hash="#a"; location.hash="#b"; location.replace("#c"); location.hash="#b"; history.back()
If you end up with #a in your browser location bar, you have reproduced the problem.
Notes:
- history.length does not change when step 4. runs.
- if step 4 is instead location.hash = "#d";, the bug does not appear.
- Effectively, webkit partially behaves as if the current history entry was still "#b" when it is in fact "#c".
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list