Bug Tracker

Opened 13 years ago

Closed 12 years ago

#6679 closed bug (invalid)

Dynamic area map fails on Safari/Chrome

Reported by: adyzah Owned by:
Priority: undecided Milestone: 1.4.3
Component: manipulation Version: 1.4.2
Keywords: area map safari chrome Cc:
Blocked by: Blocking:


NOT WORKING code follows:

<div id="d"></div> ... <script> $(document).ready(function() {

$('#d').append('<img id="i" usemap="#m" style="border:1px solid #000;width:400px;height:200px" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" />'); $('#d').append('<map name="m" id="m"></map>'); $('#m').append('<area coords="0,0,400,200" shape="rect" href="javascript:void(0)">');

}); </script>

WORKING code follows:

... change the map creation (using append) with basic stuff:

var oMap = document.createElement('map'); oMap.setAttribute('id', 'm'); oMap.setAttribute('name', 'm'); document.getElementById('d').appendChild(oMap);


  1. It's not because dynamic IMG or inline data of IMG
  2. It's not because order of append call on IMG vs MAP
  3. Strangely, the code works with jQuery 1.3.2 (both using the workaround with the append(<map><area></map>).contents()) or just plain innerHTML



Change History (1)

comment:1 Changed 12 years ago by addyosmani

need: ReviewTest Case
Priority: undecided
Resolution: invalid
Status: newclosed

I've tested your original code using:

jQuery 1.4.2 Safari 5.02 FireBug Light for Safari

and the output appears to be exactly what I see when I execute the original code in the FireFox 3.6.10.

Could you re-submit your ticket with information on what versions of Safari and Chrome you're seeing this behavior on?

Note: See TracTickets for help on using tickets.