element.scrollIntoView() does not work when using `scroll-snap-type: y mandatory` on `:root` in iOS. How to replicate: 1. Open debug view of https://codepen.io/johannesodland/pen/PoEaMWO on iOS Safari 15 2. Click next to trigger scrollIntoView Expected result: Second section scrolls into view. Result on iOS Safari: Nothing happens. Other browsers and desktop safari works as expected.
This works in the main frame, but fails inside an <iframe>, in my testing.
<rdar://problem/91603363>
ScrollingTreeFrameScrollingNodeRemoteIOS fails to implement startAnimatedScrollToPosition.
Created attachment 457444 [details] Patch
Comment on attachment 457444 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=457444&action=review > LayoutTests/fast/scrolling/ios/constrain-scrollintoview-position.html:15 > + let iframe = document.getElementsByTagName('iframe')[0]; Nit: extra space indent
https://trac.webkit.org/changeset/292812/webkit
The issue is not isolated to iframes. It was detected in a regular web page, and the code pen when opened in debug-view is a regular web-page with no iframes.
Created attachment 458571 [details] Video of issue in main frame Attaching video of issue in the main frame.
The main frame case was fixed by an earlier change. I just tested a recent build, and both work now.
I found a new way to trigger this bug in the same codepen in iOS 16. I registered it as a new issue here: https://bugs.webkit.org/show_bug.cgi?id=245722