Web-Facing Change PSA: Concurrent Smooth scrollIntoViews

263 views
Skip to first unread message

David Awogbemila

unread,
Aug 22, 2024, 11:06:02 AMAug 22
to blink-dev

Contact emails

awogb...@chromium.org

Specification

https://www.w3.org/TR/cssom-view-1/#dom-element-scrollintoview

Summary

This feature allows scrollIntoView with behavior: "smooth" to run concurrently on scroll containers which are neither descendants nor ancestors of one another. scrollIntoView with behavior: "smooth" is a JavaScript method developers can use to cause scroll containers to scroll to their descendants via a gentle scroll animation. This feature fixes Chrome's implementation of the API so that ongoing scrollIntoView animations are not cancelled by unrelated scrolls on other scroll containers. This codepen[1] demonstrates the difference in behavior between Chrome and other browsers. The features also fixes cases where Chrome fails to scroll to a page's fragment anchor because of a competing scrollIntoView that is invoked when the page loads. [1] https://codepen.io/awogbemila/pen/GRaJQMG



Blink component

Blink>Scroll

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

None



Gecko: Shipped/Shipping

WebKit: Shipped/Shipping

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

None



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

Yes

WPTs area added under https://wpt.fyi/results/css/cssom-view where many scrollIntoView tests live. https://wpt.fyi/results/css/cssom-view?label=master&label=experimental&aligned&q=scrollIntoView-multiple.html https://wpt.fyi/results/css/cssom-view?label=master&label=experimental&aligned&q=scrollintoview-multiple-nested.html https://wpt.fyi/results/css/cssom-view?label=master&label=experimental&aligned&q=smooth-scrollIntoView-with-smooth-fragment-scroll.html https://wpt.fyi/results/css/cssom-view?label=master&label=experimental&aligned&q=smooth-scrollIntoView-with-unrelated-gesture-scroll.html



Flag name on chrome://flags

None

Finch feature name

MultiSmoothScrollIntoView

Requires code in //chrome?

False

Tracking bug

https://crbug.com/325081538

Sample links


https://davmila.github.io/MultiSmoothScrollDemo
https://codepen.io/awogbemila/pen/GRaJQMG

Estimated milestones

No milestones specified



Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6270155647352832?gate=5159145048375296

This intent message was generated by Chrome Platform Status.

Adam Argyle

unread,
Aug 22, 2024, 11:39:56 AMAug 22
to David Awogbemila, blink-dev
Hooray!

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAA6pwF6VkiQJVLFWFF%2B6pO7JeSZXzmR1Tb2k3kY69mZ0F-Cp4w%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages