WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
304489
`scrollTo(0, 0)` has no effect when scroll position is within bounds of sticky element
https://bugs.webkit.org/show_bug.cgi?id=304489
Summary
`scrollTo(0, 0)` has no effect when scroll position is within bounds of stick...
Oliver Joseph Ash
Reported
2025-12-19 02:50:56 PST
Created
attachment 477789
[details]
Video demonstrating the issue It appears `window.scrollTo(0, 0)` does not work in iOS Safari when the current scroll position is within the bounds of a sticky element. Reduced test case:
https://cdpn.io/pen/debug/QwNexwR?authentication_hash=jVMpoPjEWPok
Code:
https://codepen.io/OliverJAsh/pen/QwNexwR
In the attached video I'm first clicking on the button to scroll the content a bit so it appears below the sticky nav (`window.scrollTo(0, 50)`), then clicking the button to scroll to the top (`window.scrollTo(0, 0)`). The `window.scrollTo(0, 0)` call has no affect in iOS Safari. It does appear to be working in macOS Safari, as well as other browsers like Chrome.
Attachments
Video demonstrating the issue
(9.87 MB, video/mp4)
2025-12-19 02:50 PST
,
Oliver Joseph Ash
no flags
Details
macOS Safari for comparison (works as expected)
(307.85 KB, video/quicktime)
2025-12-19 02:51 PST
,
Oliver Joseph Ash
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Oliver Joseph Ash
Comment 1
2025-12-19 02:51:47 PST
Created
attachment 477790
[details]
macOS Safari for comparison (works as expected)
Radar WebKit Bug Importer
Comment 2
2025-12-19 10:52:18 PST
<
rdar://problem/166892279
>
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