[Webkit-unassigned] [Bug 253928] New: Table flex-item inside inline-flex with column flex-direction does not recalculate size when tbody visibility is toggled

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 14 19:46:44 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=253928

            Bug ID: 253928
           Summary: Table flex-item inside inline-flex with column
                    flex-direction does not recalculate size when tbody
                    visibility is toggled
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Mac (Apple Silicon)
                OS: macOS 13
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: decademoon.bugzilla at gmail.com
                CC: bfulgham at webkit.org, simon.fraser at apple.com,
                    zalan at apple.com

Consider the following document:

<div class="flex-container">
  <table>
    <thead>
      <tr>
        <th>col</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>the quick brown fox jumps over the lazy dog</td>
      </tr>
    </tbody>
  </table>
</div>

td {
  white-space: nowrap;
}

.flex-container {
  display: inline-flex;
  flex-direction: column;
}

If we toggle the visibility of the <tbody> (or remove the node) then the size of the table is not recalculated. Then, toggling the inline-flex style on the container div will force its size to be recalculated correctly.

JsFiddle reproduction: https://jsfiddle.net/no4s7jhb/2/

Steps:
1. Click "toggle" to hide the tbody. Table size stays the same.
2. Click "force layout" and observe that the table size is recalculated.

Occurs in Safari Technology Preview 16.4 (and probably earlier). Chrome 110 and Firefox 110 recalculate the table size correctly.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230315/d033fe30/attachment-0001.htm>


More information about the webkit-unassigned mailing list