#1105: ScrollIntoViewOptions container attribute
Discussions
Log in to see TAG-private discussions.
Discussed
Jun 9, 2025 (See Github)
Jeffrey: DanC drafted a comment; we can post.
Discussed
Jun 23, 2025 (See Github)
Jeffrey: Suggest satisfied
with a comment that it'd be really nice if the specification included a description of the use case and some example code.
Jeffrey: The explainer and spec has no intro section. Will suggest satisfied but with that request.
Discussed
Jun 30, 2025 (See Github)
Jeffrey: I wrote a draft comment for this (proposing satisfied; asking for some intro text for the spec).
Call approves; Jeffrey posts comment
Comment by @jyasskin Jul 2, 2025 (See Github)
Thank you for the explanation. We're happy with this extension, but we note that there's no long-lived explainer document, and the specification doesn't include any introductory text about use cases or example use. Could you work on adding that to the specification? Thanks!
OpenedMay 30, 2025
こんにちは TAG-さん!
I'm requesting a TAG review of the ScrollIntoViewOptions container attribute.
There are many advantages of using scrollIntoView, it is an ergonomically simple way for a developer to request that a particular element is made visible, aligning it within the scroll padding of the scroller and snapping as appropriate.
However, in many circumstances it can be counter-intuitive that a scroll into view call scrolls all ancestor scrollers. E.g. If a slideshow or carousel uses a scrolling box for slides and uses scrollIntoView to advance to the next slide, this will also force the top level scroller to scroll the slideshow into view.
The container attribute on the ScrollIntoViewOptions dictionary allows a developer to use scrollIntoView without forcibly scrolling all of the ancestor scrolling containers.
This demo uses the API to show how it helps in practice.
Further details: