IMG events not firing with image maps

Events registered on img objects don't fire if the image has an associated image map, and the targeted part of the image is part of an area.

Test page Workaround is included
Reported by: Steve Joynt.

Mozilla, Opera, Safari | Reported on 20 September 2006.

This site is no longer maintained. I’m sorry, but it’s just too much work for too little return. You can continue to browse old bug reports, though.

Search reports by browser:

Atom RSS


(Add your own)

1 Posted by Simon on 21 September 2006 | Permalink

I suspect that this is a bug with ie not others.

This is how I expect it to work!

2 Posted by Steve on 7 October 2006 | Permalink

Hmm but if I've got something like:


the event fires if I click in the tag. I'm not sure if that's technically what should happen, but it does happen on other types of tags so why not in the img/map/area case?

3 Posted by Steve on 7 October 2006 | Permalink

Example in the previous comment should be:
<div onclick="blah();">

The event fires if I click in the <p> tag.

4 Posted by David Kilzer on 23 December 2006 | Permalink

Filed Bug 11938 for WebKit.

5 Posted by Grey on 27 December 2006 | Permalink

The difference is that in the example, the is inside the , while in the case this is about, the element is seperate from (i.e. on the same level as) the element and therefore shouldn't receive any events fired on the map, since it is a sibling and not a child (events bubble up from a child to their parent, they don't affect their siblings).

The solution for the IE Bug is to register event handlers on elements and make sure that you identify double-firing events, as suggested (although no easy way to do this springs to my mind).