Event bubble doesn't update when listener added to document or documentElement after loading the markup view

RESOLVED WORKSFORME

Status

defect
P3
normal
RESOLVED WORKSFORME
3 years ago
4 months ago

People

(Reporter: arni2033, Assigned: miker)

Tracking

Trunk
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Reporter

Description

3 years ago
>>>   My Info:   Win7_64, Nightly 49, 32bit, ID 20160526082509
STR_1:
1. Open url  "data:,a"  then open inspector
2. Open split console and execute:  "window.addEventListener("click", () => {});"  w/o outer quotes

AR:  There is no event bubble near <html>.  If you close and reopen the inspector it will be there
ER:  There is an event bubble next to the node


STR_2:  (may be useful)
1. Open url  data:text/html,<input onclick="window.onclick=function(e){console.log(1)}">
2. Open inspector
3. Click in input

Note:
 Originally I encountered it when I opened inspector, then set breakpoint in debugger, reloaded page,
 finished debugging, then switched back to inspector. Inspector didn't display some of event listeners
Reporter

Updated

3 years ago
No longer blocks: 1277113
Reporter

Updated

3 years ago
Component: Untriaged → Developer Tools: Animation Inspector
Reporter

Updated

3 years ago
Component: Developer Tools: Animation Inspector → Developer Tools: Inspector
@Mike: Do we get an event of some sort when new listeners are added or removed?
Flags: needinfo?(mratcliffe)
Priority: -- → P2
> @Mike: Do we get an event of some sort when new listeners are added or
> removed?

Maybe... if not it would be a small thing to add one.

I totally overlooked this... I will work on it after I finish my current papercut. (In reply to Patrick Brosset <:pbro> from comment #1)
Assignee: nobody → mratcliffe
Status: NEW → ASSIGNED
Flags: needinfo?(mratcliffe)
Whiteboard: [papercut-mr]
Comment hidden (obsolete)
Summary: Event listeners bubble doesn't get updated when a listener is added after it's loaded in the markup view - round 2, fight → Event bubble doesn't update when listener added to window, document or documentElement after loading the markup view
I will attach a more comprehensive test case.

MozReview-Commit-ID: IeC3IHiRMXc
Attachment #8828044 - Attachment description: Make event bubbles update dynamically when added to document node → [WIP] 1327727-add-event-bubbles-as-events-are-added.diff
Summary: Event bubble doesn't update when listener added to window, document or documentElement after loading the markup view → Event bubble doesn't update when listener added to document or documentElement after loading the markup view
Filter on HOTFROG.
Whiteboard: [todo-mr] → [todo-mr][t5]

Updated

Last year
Product: Firefox → DevTools
Attachment #8828044 - Attachment is obsolete: true
Whiteboard: [todo-mr][t5]

arni2033s account is disabled so upon investigating this:

The attached test works fine for me but it may be that the reporter had been looking for the event in the wrong place.

In the Markup view the documentElement node is actually the <HTML> tag. Because we have no document node we also add those listeners to the HTML tag.

Works fine for me.

Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Priority: P2 → P3
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.