Bug 239357
Summary: | Element with "position: sticky" doesn't stick if parent element has "contain: paint" | ||
---|---|---|---|
Product: | WebKit | Reporter: | Daniel Lu <danilu> |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Minor | CC: | simon.fraser |
Priority: | P2 | ||
Version: | Safari 15 | ||
Hardware: | Mac (Intel) | ||
OS: | macOS 12 |
Daniel Lu
Reproduction Steps:
1. Go to https://codepen.io/dl1644/pen/zYpmLpd in Safari 15.4 (macOS 12.3.1)
2. Attempt to scroll the green/yellow/red div to the right
3. Note that the green "sticky" div is scrolled out of view
4. Repeat steps 1 and 2 in Chrome(100) and Firefox (99). Note that the green "sticky" div stays in view
5. Return to your Safari codepen tab and remove "contain: paint" from the "#row" CSS
6. Attempt to scroll the green/yellow/red div. Note that the green "sticky" div stays in view now but the yellow "float" div now spills out the bottom of the red div
Started occurring with Safari 15.4 from what I can tell. Unsure if this counts as a regression since "contains" is newly supported in Safari 15.4 but the sticky behavior worked just fine in at least Safari 14 and below.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Simon Fraser (smfr)
*** This bug has been marked as a duplicate of bug 238016 ***