Closed
Bug 79133
Opened 24 years ago
Closed 24 years ago
missing image fires onerror event
Categories
(Core :: DOM: Events, defect)
Core
DOM: Events
Tracking
()
VERIFIED
FIXED
mozilla0.9.6
People
(Reporter: bugzilla, Assigned: jst)
References
()
Details
(Whiteboard: [HAVE FIX])
Attachments
(1 file)
|
1.31 KB,
patch
|
brendan
:
review+
vidur
:
superreview+
|
Details | Diff | Splinter Review |
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
Comment 1•24 years ago
|
||
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.
Updated•24 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
Comment 2•24 years ago
|
||
jst, can you help?
/be
| Assignee | ||
Comment 3•24 years ago
|
||
Taking.
Assignee: joki → jst
Status: ASSIGNED → NEW
Target Milestone: mozilla1.0 → mozilla0.9.5
| Assignee | ||
Comment 4•24 years ago
|
||
| Assignee | ||
Comment 5•24 years ago
|
||
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 6•24 years ago
|
||
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+
| Assignee | ||
Comment 7•24 years ago
|
||
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 8•24 years ago
|
||
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+
| Assignee | ||
Updated•24 years ago
|
Target Milestone: mozilla0.9.5 → mozilla0.9.6
| Assignee | ||
Comment 9•24 years ago
|
||
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
| Reporter | ||
Comment 10•24 years ago
|
||
used http://gemal.dk/test/onerror.html to verify
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•