Closed Bug 79133 Opened 24 years ago Closed 24 years ago

missing image fires onerror event

Categories

(Core :: DOM: Events, defect)

defect
Not set
major

Tracking

()

VERIFIED FIXED
mozilla0.9.6

People

(Reporter: bugzilla, Assigned: jst)

References

()

Details

(Whiteboard: [HAVE FIX])

Attachments

(1 file)

If you go to: http://gemal.dk/test/onerror.html which uses a window.onerror function to display javascript errors you get a weird error saying: error: [object KeyEvent] The cause is a missing image. I have a <img src="help.gif"> but the image help.gif doesn't exit. This is really bad. build 20010506
This one is going to be annoying. Basically the DOM 2 spec is wrong. It has img error event bubbling, which will cause this. I'll have to think about it. Either we disobey the spec and don't bubble or I work around it.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
jst, can you help? /be
Taking.
Assignee: joki → jst
Status: ASSIGNED → NEW
Target Milestone: mozilla1.0 → mozilla0.9.5
Attached is a patch that works around the problem with the event system not properly dealing with the flags that are passed in that would tell if certain events should bubble or not. The patch hardcodes more event types to not bubble, or caputer. reviews?
Status: NEW → ASSIGNED
Whiteboard: [HAVE FIX]
Comment on attachment 51514 [details] [diff] [review] Proposed workaround. r=brendan@mozilla.org, but what's the bug being worked around? Is it on file? If so, comment its number into the patch? /be
Attachment #51514 - Flags: review+
Brendan, thanks for the review. The bug being worked around is the fact that we're not using the flags to HandleDOMEvent() as flags, Joki knows about this and is planning on fixing it, but I don't know if there's a bug on file for it, Joki?
Comment on attachment 51514 [details] [diff] [review] Proposed workaround. sr=vidur You'd think we'd have hit problems with bubbling image onloads before this, no? Wouldn't such loads cause multiple, incorrect invocations of a window onload?
Attachment #51514 - Flags: superreview+
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Blocks: 84512
Fix checked in. Vidur, image onload's were actually not bubbling (they were blocked elsewere), I added that mostly for consistency, once the real problem is fixed we can remove all the hardcoded blocking of event bubbling...
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: