WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
290128
[css-anchor-position-1] scrolling with anchor()/position-area positioned element is broken
https://bugs.webkit.org/show_bug.cgi?id=290128
Summary
[css-anchor-position-1] scrolling with anchor()/position-area positioned elem...
Kiet Ho
Reported
2025-03-20 14:48:31 PDT
Created
attachment 474652
[details]
Reproduction Google Chrome 136.0.7077.0 (Official Build) canary (arm64) WebKit
292377@main
See attached repro. Repro explanation: * Containing block is 300x500px and vertically scrollable * Green box is the anchor, orange boxes are positioned relative to the anchor using anchor() or position-area * Containing block contains a very long div to force scrolling * JS programmatically scrolls the containing block down by 100px The orange boxes should stay positioned to the green box, but this is not the case in WebKit. Note: this might be covered in some WPT scrolling tests.
Attachments
Reproduction
(1.34 KB, text/html)
2025-03-20 14:48 PDT
,
Kiet Ho
no flags
Details
Screenshot (Chrome on left, WebKit on right)
(198.33 KB, image/png)
2025-03-20 14:50 PDT
,
Kiet Ho
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2025-03-20 14:48:38 PDT
<
rdar://problem/147528893
>
Kiet Ho
Comment 2
2025-03-20 14:50:43 PDT
Created
attachment 474653
[details]
Screenshot (Chrome on left, WebKit on right)
fantasai
Comment 3
2025-05-19 09:42:58 PDT
The behavior seems like we're double-applying the scrolling offset for these boxes.
fantasai
Comment 4
2025-05-19 09:43:55 PDT
My guess is that we're applying the magic scroll offset, but we shouldn't because these are in the same scroll container as their anchor.
fantasai
Comment 5
2025-05-23 15:45:45 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/45862
EWS
Comment 6
2025-05-26 11:01:04 PDT
Committed
295422@main
(6a980b2b4039): <
https://commits.webkit.org/295422@main
> Reviewed commits have been landed. Closing PR #45862 and removing active labels.
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