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

Comments

(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:

Hello

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();">
<p>Hello</p>
</div>

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.

http://bugs.webkit.org/show_bug.cgi?id=11938

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).