Bug 304489

Summary: `scrollTo(0, 0)` has no effect when scroll position is within bounds of sticky element
Product: WebKit Reporter: Oliver Joseph Ash <oliverjash>
Component: ScrollingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: bramus, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 26   
Hardware: iPhone / iPad   
OS: iOS 26   
Attachments:
Description Flags
Video demonstrating the issue
none
macOS Safari for comparison (works as expected) none

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
macOS Safari for comparison (works as expected) (307.85 KB, video/quicktime)
2025-12-19 02:51 PST, Oliver Joseph Ash
no flags
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
Note You need to log in before you can comment on or make changes to this bug.