RESOLVED CONFIGURATION CHANGED20850
Can not change the attribute value of coords in area element
https://bugs.webkit.org/show_bug.cgi?id=20850
Summary Can not change the attribute value of coords in area element
Alun Jones
Reported 2008-09-15 00:49:15 PDT
The document source is changed, but the values are not updated in the DOM. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <title>AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.29 Safari/525.13</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript"> function changeCoords() { var obj = document.getElementById('hotspot'); obj.setAttribute('coords', '195,130,100'); /* // to fix the problem var newObj = obj.cloneNode(true); var parent = document.getElementById('myImage'); parent.removeChild(obj); parent.appendChild(newObj); */ } </script> <style type="text/css"> </style> </head> <body> <div> <img src="../../Images/horses.jpg" width="390" height="260" alt="horses" usemap="#myImage"> <button type="button" onclick="changeCoords();">changeCoords</button> </div> <map id="myImage" name="myImage"> <area id="hotspot" shape="circle" coords="195,130,25" href="#" alt=""> </map> </body> </html>
Attachments
Problem, includes temporary work around (996 bytes, text/html)
2008-09-15 00:52 PDT, Alun Jones
no flags
Alun Jones
Comment 1 2008-09-15 00:52:49 PDT
Created attachment 23431 [details] Problem, includes temporary work around
Alexey Proskuryakov
Comment 2 2010-04-27 14:29:56 PDT
*** Bug 38196 has been marked as a duplicate of this bug. ***
Ahmad Saleem
Comment 3 2023-12-18 06:21:49 PST
Updated the test case: https://jsfiddle.net/t7nuL1yb/ Clicking 'change coords' don't do anything.
Anne van Kesteren
Comment 4 2024-05-24 03:21:15 PDT
This seems to work fine. Initially the clickable circle is around the "x" in the image and then after clicking it's much larger as expected.
Note You need to log in before you can comment on or make changes to this bug.