Open Bug 1544428 Opened 5 years ago Updated 1 year ago

Setting window.location.hash to an empty string on a site without a hash causes a popstate event

Categories

(Core :: DOM: Navigation, defect, P3)

defect

Tracking

()

Webcompat Priority P3

People

(Reporter: denschub, Unassigned)

References

Details

(Whiteboard: [webcompat])

Attachments

(1 file)

Attached file Simple test case

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.

Flags: webcompat?

Kicking this to Document Navigation? Please feel free to put it somewhere else more appropriate.

Component: General → Document Navigation
Product: Firefox → Core

Migrating Webcompat whiteboard priorities to project flags. See bug 1547409.

Webcompat Priority: --- → ?

See bug 1547409. Migrating whiteboard priority tags to program flags.

Priority: -- → P3
Webcompat Priority: ? → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: