Closed Bug 331306 Opened 20 years ago Closed 20 years ago

The "load" event on images does not achieve the capture phase

Categories

(Core :: DOM: Events, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mjs, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/417.9 (KHTML, like Gecko) Safari/417.8 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 Event listeners registered with a true useCapture argument on ancestors of an IMG element do not receive the "load" event. It is correct for them not to bubble, but every event on on element should achieve the capture phase. Reproducible: Always Steps to Reproduce: 1. Try test case to be attached shortly. 2. 3. Actual Results: Capturing listeners on document and body do not fire when the image load event does. Not achieving the capture phase for "load" is contrary to DOM Level 2 Events and DOM Level 3 events. It also creates possible compatibility problems when sites write to firefox. For example, if content sets a capturing event listener for "load" on the window expecting it to fire on load of the document, it would fire for every image that loads in a conforming implementation. See also related bug 235441 which causes capturing listeners to fire on the target of the event. The test logs: IMG, phase: 2 target: [object HTMLDocument] IMG, phase: 2 target: [object HTMLDocument] As an additional bug, the event's target is the document even though it is dispatched on image elements. I'll file that one separately. Also, bug 235441 causes the capture handler on the img to fire, it should not. Expected Results: Capturing listeners should have fired. Logging should be something like: Window, phase: 1 target: [object IMG] Document, phase: 1 target: [object IMG] Body, phase: 1 target: [object IMG] IMG, phase: 2 target: [object IMG]
See also related bug 331308
This appears working on trunk. Probably as a result of bug 234455.
(In reply to comment #3) > This appears working on trunk. Probably as a result of bug 234455. > Yep, this was fixed in bug 234455. I'd like to fix bug 235441 too, but it is still unclear what should happen when XBL is used.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: