[Webkit-unassigned] [Bug 224424] New: Element retains dimensions after its children are removed, children are not rendered anymore
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Apr 12 02:04:47 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=224424
Bug ID: 224424
Summary: Element retains dimensions after its children are
removed, children are not rendered anymore
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Layout and Rendering
Assignee: webkit-unassigned at lists.webkit.org
Reporter: tomc at caurea.org
CC: bfulgham at webkit.org, simon.fraser at apple.com,
zalan at apple.com
I have a horizontally scrollable list of cards, and a toggle button which removes/adds the cards from the container. When the cards are removed, the container becomes an div with no children. On Safari, clicking the button to remove the cards removes the children, but the container retains its original dimensions. Furthermore, the label from the button disappears (possibly a completely unrelated bug).
A repro case is here: https://vvugb.csb.app. Click the button and observe how the container doesn't shrink vertically. The <hr> is placed after the container, so it should move up, but doesn't. Clicking the button again to show the cards doesn't work anymore, the cards are inserted into the DOM but not rendered.
You can see the code here: https://codesandbox.io/s/peaceful-morning-vvugb?file=/src/App.tsx.
A couple notes:
- If I remove overflowX:auto from the container, the bug disappears.
- If I remove the card with the longest name ({ name: "Excepteur sint occaecat cupidatat non proident" }), the bug disappears (possibly bug is present whenever the text wraps to multiple lines?)
- Resizing the viewport fixes the bug temporarily (I guess because it triggers a layout/render of the whole viewport).
--
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/20210412/475d4952/attachment.htm>
More information about the webkit-unassigned
mailing list