Overview Description: Element is incorrectly rendered when is created, removed and created again using DOM methods Steps to Reproduce: 1) Open testcase 2) Click into document by right mouse button 3) Move mouse about 50 px right and press right mouse button again Actual Results: DIV element isn't correctly rendered (text in element isn't visible). Expected Results: DIV element will be correctly rendered. Build Date & Platform: Build 2006-11-10 on Mac OS 10.5. Test case: <html> <head> <style> #menu { background-color:blue; position:absolute; width:200px; } </style> <script> var k_e; function dsp() { var k_contextMenu = document.getElementById("menu"); if (!k_contextMenu) { k_contextMenu = document.createElement('div'); k_contextMenu.id = 'menu'; for (var i =1; i < 10; i++) { k_contextMenu.innerHTML += '<div>item ' + i + '</div>'; } document.body.appendChild(k_contextMenu); } k_contextMenu.style.left = k_e.clientX + 'px' k_contextMenu.style.top = k_e.clientY + 'px'; } function removeMenu() { var k_contextMenu = document.getElementById("menu"); if (k_contextMenu) { var k_p = k_contextMenu.parentNode; k_p.removeChild(k_contextMenu); } } function showMenu() { removeMenu(); k_e = event; dsp(); } </script> </head> <body oncontextmenu="showMenu();return false;" onmousedown="removeMenu()"> </body> </html> Workaround: Replace calling of function dsp() by setTimeout('dsp();',0)
Created attachment 11457 [details] Testcase
Created attachment 11458 [details] Screenshot - incorrectly rendered DIV element
I am unable to reproduce with locally built r17702 on Tiger.
Please file any issues you find when using Leopard via <http://bugreport.apple.com>.
Reported as Bug ID# 4833454 via http://bugreport.apple.com.