Skip to content

Commit ca0c1dd

Browse files
committed
[cssom-view][css-contain-2] Per WG resolution, clarify that scrollIntoView() doesn't scroll to children of a 'c-v:hidden' element. Fixes #6529
1 parent 8139dd6 commit ca0c1dd

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

css-contain-2/Overview.bs

+7
Original file line numberDiff line numberDiff line change
@@ -1620,6 +1620,13 @@ Restrictions and Clarifications {#cv-notes}
16201620
if this changes the element's size,
16211621
it might not align in the viewport exactly as requested.
16221622

1623+
If an element is not available to user-agent features
1624+
(for example, if it is [=skipped=]
1625+
due to a ''content-visiblity: hidden'' ancestor),
1626+
then scrolling operations
1627+
must not scroll to it at all,
1628+
as if it did not have a layout box.
1629+
16231630
6. If an element with ''content-visibility: auto''
16241631
that is [=skipping its contents=]
16251632
is focused

cssom-view-1/Overview.bs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,9 @@ The <dfn method for=Element caniuse=scrollintoview>scrollIntoView(<var>arg</var>
11051105
1. Set <var>block</var> to the {{ScrollIntoViewOptions/block}} dictionary member of <var>options</var>.
11061106
1. Set <var>inline</var> to the {{ScrollIntoViewOptions/inline}} dictionary member of <var>options</var>.
11071107
1. Otherwise, if <var>arg</var> is false, then set <var>block</var> to "<code>end</code>".
1108-
1. If the element does not have any associated <a>layout box</a>, then return.
1108+
1. If the element does not have any associated <a>layout box</a>,
1109+
or is not available to user-agent features,
1110+
then return.
11091111
1. <a lt='scroll an element into view'>Scroll the element into view</a>
11101112
with <var>behavior</var>, <var>block</var>, and <var>inline</var>.
11111113
1. Optionally perform some other action that brings the element to the user's attention.

0 commit comments

Comments
 (0)