The ScrollIntoViewOptions container option allows developers to perform a scrollIntoView only scrolling the nearest ancestor scroll container. For example, the following snippet only scrolls the scroll container of target to bring target into view, but will not scroll all of the scroll containers to the viewport: target.scrollIntoView({container: 'nearest'});
None
None that I can think of.
It's possible to just use this feature as a progressive enhancement though I expect in practice most developers will want to polyfill falling back to scrollTo on non-supporting browsers. Detection of the feature can be done in Javascript by doing a test scrollIntoView, and if done in a position: fixed descendant should prevent highjacking the user's scroll.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
None
Shipping on desktop | 140 |
DevTrial on desktop | 138 |
Shipping on Android | 140 |
DevTrial on Android | 138 |
Shipping on WebView | 140 |
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).
In https://github.com/w3c/csswg-drafts/issues/9452 there was consideration of passing an element to contain the scroll to. As discussed in https://github.com/w3c/csswg-drafts/issues/9452#issuecomment-2607879021 we think this is easily added in a backwards compatible way if there is a need for it.LGTM3 (there are two LGTM1 so next is 3). Note Alex' request.
/Daniel
--
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 visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/7d48c206-9e1c-4b68-9ff9-1369c0f08ae8n%40chromium.org.