WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
292516
Inserting a subgrid child with `position: absolute` can cause `auto` column widths to be calculated incorrectly.
https://bugs.webkit.org/show_bug.cgi?id=292516
Summary
Inserting a subgrid child with `position: absolute` can cause `auto` column w...
dwarn
Reported
2025-05-04 21:09:41 PDT
Overview: Inserting a subgrid child with `position: absolute` can cause `auto` column widths to be calculated incorrectly. --- Reproduction: 1. Go to
https://codesandbox.io/p/sandbox/sleepy-noyce-vynd7s
2. Hover over the subgrid element to inject an element. 3. Or click the 'toggle inserted element' button. --- Generic Steps to Reproduce: 1. Create a grid with an `auto` width column and at least one other non-`auto` width column. 2. Create a subgrid that spans the entire parent grid. 3. Have a child that is always visible as part of the subgrid in the `auto` column. 4. Insert an absolutely positioned child in the non-`auto` column, after the initial load. 5. (Optional) remove the second child, the bug remains. --- Actual Results: The `auto` width column has an incorrect width. It looks like it is being treated as `1fr` instead. --- Expected Results: The `auto` width column should not be affected by the addition of a sibling with `position: absolute`. The initial column width, before inserting the absolutely positioned second child, is correct and consistent with other browsers. --- Build Date & Hardware: Safari 18.3 (19620.2.4.111.8, 19620) on MacOS 14.7.2 --- Additional Builds and Platforms: Not reproducible on Chrome or Firefox.
Attachments
Add attachment
proposed patch, testcase, etc.
Karl Dubost
Comment 1
2025-05-08 19:36:41 PDT
This is interesting because sometimes I get the right layout. After a while the dashed border around subgrid child is exhibiting the right width. it takes a couple of seconds.
Radar WebKit Bug Importer
Comment 2
2025-05-11 21:10:12 PDT
<
rdar://problem/151125072
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug