Created attachment 61974 [details] image needed for bug demo
Created attachment 61975 [details] bug demo (this time with correct img url) Forget the first attachment, it references a local url which doesn't exist on bugzilla.
Created attachment 62031 [details] new bug demo (see comments below) After further investigation I found that the problem doesn't seem to be caused by the use of createContextualFragment. Whether I dynamically add the img and the map by using createContextualFragment or by setting innerHTML of an element or by using DOM methods to create and insert the map and the img, the problem is always that the hand cursor appears over the complete image map, with the area not reacting to the mouseover and click. I will change the summary after uploading this file and will also change the component to DOM HTML. As for the test case, for img maps are created, the first document.written, the second created with createContextualFragment, the third by setting innerHTML of a div and the fourth by using DOM core and HTML methods. Only the first map works as intended.
changed summary to better describe the problem
a note. .innerHTML just uses createContextualFragment internally, so those shoudl behave identically...
It appears that the problem is that the HTMLMapElement isn't correctly bound to the useMap attribute of the img when it's done dynamically. The rest works fine. Still investigating.
bug 97587 talks about the same thing, but I have not compared the testcases yet
I 'm the reporter of bug 97587 and I think that these 2 bugs are duplicate....
16 years ago
Duping. *** This bug has been marked as a duplicate of 97587 ***