NEW291728
removing a thead element (collapsed table-row-group) doesn't relayout properly the table
https://bugs.webkit.org/show_bug.cgi?id=291728
Summary removing a thead element (collapsed table-row-group) doesn't relayout properl...
Karl Dubost
Reported 2025-04-17 19:31:00 PDT
https://wpt.fyi/results/css/css-tables/collapsed-border-remove-row-group.html https://wpt.live/css/css-tables/collapsed-border-remove-row-group.html The original table looks like ``` <style> table { border-collapse: collapse; } td { border-bottom: 10px solid; } </style> <table> <thead> <tr> <td>Something</td> </tr> </thead> <thead id="removeMe"> <tr> <td style="border: 0">Something</td> </tr> </thead> <tbody> <tr> <td>Body</td> </tr> </tbody> </table> ``` It has a script when the page has finished loading which removes the second thead. ``` onload = function () { removeMe.getBoundingClientRect(); removeMe.remove(); }; ``` Then the table becomes: ``` <table> <thead> <tr> <td>Something</td> </tr> </thead> <tbody> <tr> <td>Body</td> </tr> </tbody> </table> ``` On Safari: Before removing. Height values TABLE 80 THEAD 25 THEAD 25 (removeMe) TBODY 25 After removing. TABLE 55 THEAD 25 TBODY 25 On Firefox I have Before removing. Height values TABLE 83.6 THEAD 26.2 THEAD 26.2 (removeMe) TBODY 26.2 After removing. TABLE 62.4 THEAD 26.2 TBODY 31.2 the tbody/tr/td comes to collide with the thead above.
Attachments
rendering in safari, firefox, chrome (933.56 KB, image/png)
2025-04-17 19:32 PDT, Karl Dubost
no flags
Karl Dubost
Comment 1 2025-04-17 19:32:39 PDT
Created attachment 474949 [details] rendering in safari, firefox, chrome
Radar WebKit Bug Importer
Comment 2 2025-04-24 19:31:12 PDT
Note You need to log in before you can comment on or make changes to this bug.