Skip to content

Commit dad91f4

Browse files
authored
[cssom-view-1] Editorial scrollIntoView container attribute fixes (#12354)
1 parent 52fb649 commit dad91f4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cssom-view-1/Overview.bs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,8 +1299,8 @@ The <dfn method for=Element caniuse=scrollintoview>scrollIntoView(<var>arg</var>
12991299
1. Set <var>behavior</var> to the {{ScrollOptions/behavior}} dictionary member of <var>options</var>.
13001300
1. Set <var>block</var> to the {{ScrollIntoViewOptions/block}} dictionary member of <var>options</var>.
13011301
1. Set <var>inline</var> to the {{ScrollIntoViewOptions/inline}} dictionary member of <var>options</var>.
1302-
1. If the {{ScrollIntoViewOptions/container}} dictionary member of <var>options</var>,
1303-
set <var>container</var> to this element.
1302+
1. If the {{ScrollIntoViewOptions/container}} dictionary member of <var>options</var> is "<code>nearest</code>",
1303+
set <var>container</var> to the element.
13041304
1. Otherwise, if <var>arg</var> is false, then set <var>block</var> to "<code>end</code>".
13051305
1. If the element does not have any associated [=CSS/box=],
13061306
or is not available to user-agent features,
@@ -1545,7 +1545,9 @@ means to run these steps:
15451545
1. <a for="viewport">Perform a scroll</a> of the <a>viewport</a> to <var>position</var>, with <var>root element</var> as the associated element and <var>behavior</var>
15461546
as the scroll behavior.
15471547
</dl>
1548-
1. If <var>container</var> is not null and <var>scrolling box</var> is a [=shadow-including inclusive ancestor=] of <var>container</var>,
1548+
1. If <var>container</var> is not null and either <var>scrolling box</var>
1549+
is a [=shadow-including inclusive ancestor=] of <var>container</var> or
1550+
is a <a>viewport</a> whose <a for="/">document</a> is a [=shadow-including inclusive ancestor=] of <var>container</var>,
15491551
abort the rest of these steps.
15501552

15511553
</div>

0 commit comments

Comments
 (0)