NEW24902
Javascript <TR> style.display=block issue
https://bugs.webkit.org/show_bug.cgi?id=24902
Summary Javascript <TR> style.display=block issue
barekm
Reported 2009-03-27 15:06:05 PDT
Hi, Please see the html source code below. in google chrome the behavior is strange. click on the top link Hide then click on show. the row hidden in the first click is not retored at the good width after clicking on show !! <html> <body style="font-family:Arial;font-size:8pt"> <script language="javascript"> function showhide(id) { for (var i = 0; i < document.all[id].length; i++) { obj = document.all[id][i]; if (obj.attributes['id'].value == id) { if (obj != null) { if(obj.nodeName=='A') obj.innerHTML = obj.innerHTML=='Hide'? 'Show':'Hide'; else obj.style.display = obj.style.display=='none'? 'block':'none'; } } } } </script> <font style="font-size:10pt;"> (click on hide then show to see the problem <a id="r2" href="javascript:showhide('r2');">Hide</a>)</font><hr><br> <table border="1" width="1040" style="border-collapse: collapse; font-size:8pt"> <tr> <td width="560" colspan="5"align="center">xxxxxxxx</td> <td width="140" align="center" colspan="2"><b>ggg</b><br>(ggg)<br><span style="color:#008000">(ggg)</span></td> <td width="140" align="center" colspan="2"><b>ffff</b><br>(fff)<br><span style="color:#800000"> (fff)</span></td> <td width="200">&nbsp;</td> </tr> <tr bgcolor="F0F0F0"> <td width="40" align="center"><b>xxx</b></td> <td width="80" align="center"><b>date</b></td> <td width="200" align="center"><b>dd</b></td> <td width="180" align="center"><b>dddd</b></td> <td width="60" align="center">ffff</td> <td width="70" align="center"><b>fff</b></td> <td width="70" align="center"><b>fff</b></td> <td width="70" align="center"><b>fff</b></td> <td width="70" align="center"><b>fff</b></td> <td width="200" align="center"><b>fff</b></td> </tr> <tr id="r2"> <td width="40" align="right">xx </td> <td width="80" align="center">23-Mar-2009</td> <td width="200" title="CANTOR FITZGERALD">xxxxxxxxxxxxxxxxxxxxxx</td> <td width="180" title="NATASHA BOYDEN (3086)">xxxxxxxxxxxxxxxxxxx</td> <td width="60" align="center">42% (9)</td> <td width="70" align="center" style="color:#008000"><b>5.68%</b></td> <td width="70" align="center" style="color:#008000"><b>4.08%</b></td> <td width="70">&nbsp;</td> <td width="70">&nbsp;</td> <td>&nbsp;</td> </tr> </table> </body></html>
Attachments
Safari 15.5 differs from other browsers (1.04 MB, image/png)
2022-07-30 08:18 PDT, Ahmad Saleem
no flags
Adrian
Comment 1 2009-12-22 01:20:02 PST
This was logged with Chromium as Issue #9433 http://code.google.com/p/chromium/issues/detail?id=9433. They have investigated and concluded it is a WebKit issue. Please can you progress this? "Comment 4 by karen@chromium.org, Today (14 hours ago) this is a webkit issue. happens in safari, as well. can you please file with webkit? thank you!" Thanks Adrian
Ahmad Saleem
Comment 2 2022-07-30 08:18:05 PDT
Created attachment 461305 [details] Safari 15.5 differs from other browsers I changed test case from Comment 0 into JSFiddle below: Link - https://jsfiddle.net/ouwj9a4v/show By doing "Hidden" and "Show", we can see that Safari 15.6 does not display the border of table as can be seen in attached screenshot. While all other browsers (Chrome Canary 106 and Firefox Nightly 105) do show the table border properly as can be seen in the attached screenshot. Just wanted to share updated testing result. Thanks!
Radar WebKit Bug Importer
Comment 3 2022-07-30 09:26:50 PDT
Note You need to log in before you can comment on or make changes to this bug.