Closed Bug 1467437 Opened 6 years ago Closed 4 years ago

hashchange and popstate events should not bubble

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: foolip, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36

Steps to reproduce:

Tests: https://github.com/web-platform-tests/wpt/pull/11355
Gecko import: https://bugzilla.mozilla.org/show_bug.cgi?id=1466827
Spec change: https://github.com/whatwg/html/pull/3737

Results will be available here:
https://wpt.fyi/results/html/browsers/browsing-the-web/history-traversal/hashchange_event.html
https://wpt.fyi/results/html/browsers/browsing-the-web/history-traversal/popstate_event.html


Actual results:

Only fires has event.bubbling set to true for the hashchange and popstate events. Since it fires on the window object, there isn't anywhere to bubble up to, so it'll only affect the event's bubbling property.


Expected results:

These two events should not bubble, per recent spec change.
Component: Untriaged → DOM
Product: Firefox → Core
Priority: -- → P3
Component: DOM → DOM: Core & HTML
Status: UNCONFIRMED → NEW
Ever confirmed: true

I think I caught all the places in our tree that add event listeners for these
events on a non-Window (and hence depend on bubbling behavior), but I'm a
little worried about what happens if webextensions do bareword
addEventListener() for these events...

Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c4c3a54fcffa
Align with other browsers and the spec for whether hashchange and popstate events bubble. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: