Closed
Bug 41191
Opened 25 years ago
Closed 24 years ago
img tag not supporting scripted onclick
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
VERIFIED
FIXED
People
(Reporter: mail, Assigned: joki)
Details
(Whiteboard: [fixinhand][nsbeta3+])
Attachments
(2 files)
235 bytes,
text/html
|
Details | |
912 bytes,
patch
|
Details | Diff | Splinter Review |
The onClick event is captured properly when embedded in the tag
<img src="blank.jpg" onClick="alert('embedded click')"> or when using the
addEventListener("click",functionName,false), but not with the simple
document.getElementById(idOfImage).onclick = addHandler;
Reporter | ||
Comment 1•25 years ago
|
||
Comment 2•25 years ago
|
||
I can reproduce this bug on PowerMac G3 with 160 MB RAM running Mac OS 8.6.
Mozilla Build 20000053108.
The test page works correctly on Explorer 5 Mac but not in Navigator 4.7.3 nor in
Mozilla.
Is this in any DOM spec (I can't find it), or is it just a bug for IE5-parity?
Reporter | ||
Comment 4•25 years ago
|
||
I would think this would fall under DOM Level 0 or the Netscape 3 event model,
which was never implemented for most elements. This behavior is supported in
M15 for virtually every element in a document except img. If this is something
worth fixing which I think it is, I guess a better testcase is needed to see
which elements support this and which do not.
Comment 5•25 years ago
|
||
Joki, I played around with this a bit and it looks like we really don't handle
dynamically setting img.onclick, could you have a look?
Assignee: jst → joki
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 6•25 years ago
|
||
Fix in hand. Attaching diff, not sure when this will get approval for checkin.
Status: NEW → ASSIGNED
Whiteboard: fix in hand, diff attached.
Assignee | ||
Comment 7•25 years ago
|
||
Assignee | ||
Comment 10•25 years ago
|
||
Adding [fixinhand] to allow easier sorting while waiting for nsbeta3 tree
checkins.
Nominating nsbeta3.
Comment 12•25 years ago
|
||
Joki's fixes have been checked in by saari. Marking fixed.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 13•24 years ago
|
||
Nisheeth, Some how I'm not able to see the alert. I guess it is still there. I
tried it with Win-95 too, but it does not work.
Reopening right now, if you think it is fixed please let me know like that.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 14•24 years ago
|
||
Well the test case seems to not have an image with it. If you try this test
case with a valid image it works just fine. I don't know that we are trying to
support events over broken images.
Status: REOPENED → RESOLVED
Closed: 25 years ago → 24 years ago
Resolution: --- → FIXED
Verified fixed on NT build around 2000-09-25.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•