NEW 272079
[css-scroll-snap] Fragment links does not work with scroll-snap on root
https://bugs.webkit.org/show_bug.cgi?id=272079
Summary [css-scroll-snap] Fragment links does not work with scroll-snap on root
Johannes Odland
Reported 2024-04-03 02:47:30 PDT
Anchor links on a page with scroll-snap on the root/html element fails. Steps to reproduce: 1. Open https://johannesodland.github.io/browserbugs/2024/safari-scroll-snap-fragment-links-issue.html 2. Click on one of the anchor links Expected result: The linked fragment/section is scrolled into view. Actual result: The browser sometimes scrolls down to the relevant fragment, but snaps back to the top.
Attachments
Radar WebKit Bug Importer
Comment 1 2024-04-03 10:06:36 PDT
Ahmad Saleem
Comment 2 2024-04-04 04:59:05 PDT
I am unable to reproduce on first load, although it is bit more involved in my case, where I have to navigate away from tab opened and then refresh tab few times to reproduce this reliably. @Johannes - is this used to work in earlier iOS versions by any chance you know and also if you have reliable reproduction steps, it would be good to add. :-)
Johannes Odland
Comment 3 2024-04-04 05:16:28 PDT
Thanks for testing Ahmad. Navigating to one fragment, and then to another seems to consistently reproduce the bug for me: 1. go to section 4 ( https://johannesodland.github.io/browserbugs/2024/safari-scroll-snap-fragment-links-issue.html#section-4 ) 2. Scroll to top 3. Click one of the anchor links
Johannes Odland
Comment 4 2024-11-19 10:02:44 PST
Retested on iOS 18.1, still failing.
Note You need to log in before you can comment on or make changes to this bug.