Setting window.location.hash to an empty string on a site without a hash causes a popstate event
Categories
(Core :: DOM: Navigation, defect, P3)
Tracking
()
Webcompat Priority | P3 |
People
(Reporter: denschub, Unassigned)
References
Details
(Whiteboard: [webcompat])
Attachments
(1 file)
261 bytes,
text/html
|
Details |
The attached testcase has a button setting the location hash to an empty string via window.location.hash = '';
and an alert box on onpopstate
.
If you open this testcase without a hash in Firefox and click the button, the URL changes from testcase.html
to testcase.html#
, and a popstate
event is fired. In Chrome, the URL is not changing and no event is fired.
This difference actually resulted in a webcompat report about a misbehaving site. Filing this into Firefox::General, because I have no idea where this would fit.
Comment 1•5 years ago
|
||
Kicking this to Document Navigation? Please feel free to put it somewhere else more appropriate.
Comment 2•5 years ago
|
||
Migrating Webcompat whiteboard priorities to project flags. See bug 1547409.
Comment 3•5 years ago
|
||
See bug 1547409. Migrating whiteboard priority tags to program flags.
Updated•5 years ago
|
Updated•4 years ago
|
Updated•2 years ago
|
Updated•1 year ago
|
Description
•