Open Bug 116317 Opened 23 years ago Updated 2 years ago

strange onclick behavior when img is tagged ISMAP

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect

Tracking

()

Future

People

(Reporter: beau, Unassigned)

References

Details

Attachments

(1 file)

Try the following code:

<A HREF='afadfasdfasdf' onClick='alert("yar");return false'>
<IMG SRC='' ISMAP>
</A>

(obviously, you'll have to insert some src for the image tag)

Clicking the image causes the alert to happen, but the "return false" is 
ignored and a mystery page is loaded (it has the contents "<HTML><
BODY></BODY></HTML>)".   

I would expect that this would behave like a normal link, wherein the 
default action of link-clicking (i.e. loading any page) is cancelled.

I tested with the latest mac build and still get the same behavior.  Please 
contact me with any questions.  Thanks.
Attached file Reduced testcase
Confirming with trunk binaries 20011219xx WinNT, Linux, Mac9.1.
OS : Mac ---> All.

Browser, not engine. Reassigning to Event Handling for further triage.
Assignee: rogerl → joki
Status: UNCONFIRMED → NEW
Component: Javascript Engine → Event Handling
Ever confirmed: true
OS: Mac System 9.x → All
QA Contact: pschwartau → madhur
Hardware: Macintosh → All
Midair.

This is possibly related to bug 111659.
OS: All → Mac System 9.x
Hardware: All → Macintosh
OS: Mac System 9.x → All
Hardware: Macintosh → All
Target Milestone: --- → mozilla1.1
Keywords: 4xp
QA Contact: madhur → rakeshmishra
QA Contact: rakeshmishra → trix
.
Assignee: joki → saari
QA Contact: trix → ian
retargeting
Target Milestone: mozilla1.1alpha → Future
*** Bug 297120 has been marked as a duplicate of this bug. ***
Assignee: saari → events
This works correctly in IE 6.0
It is important to have this fixed for AJAX based code that also aims to work correctly with Javascript disabled browsers - you can spit out different HTML of course, but depending on when it is known that JavaScript is disabled, this maybe somewhat painful.
Assignee: events → nobody
QA Contact: ian → events
Component: Event Handling → User events and focus handling
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: