Skip to content

Commit 4f8f95e

Browse files
committed
Rename "if-needed" to "if-hidden"; don't scroll when partially visible
As per #1805 (comment) point 1.
1 parent 14df329 commit 4f8f95e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cssom-view-1/Overview.bs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,15 +1078,15 @@ Note: This {{DOMRect}} object is not <a spec=html>live</a>.
10781078
<h2 id=extension-to-the-element-interface>Extensions to the {{Element}} Interface</h2>
10791079

10801080
<pre class=idl>
1081-
enum ScrollIntoViewMode { "always", "if-needed" };
1081+
enum ScrollIntoViewMode { "always", "if-hidden" };
10821082
enum ScrollLogicalPosition { "start", "center", "end", "nearest" };
10831083
dictionary ScrollIntoViewOptions : ScrollOptions {
10841084
ScrollIntoViewMode scroll = "always";
10851085
ScrollLogicalPosition block = "start";
10861086
ScrollLogicalPosition inline = "nearest";
10871087
};
10881088
dictionary FocusScrollOptions : ScrollOptions {
1089-
ScrollIntoViewMode scroll = "if-needed";
1089+
ScrollIntoViewMode scroll = "if-hidden";
10901090
ScrollLogicalPosition block;
10911091
ScrollLogicalPosition inline;
10921092
};
@@ -1335,9 +1335,9 @@ a <a>scrolling box</a> <var>scrolling box</var>, in order of innermost to outerm
13351335
1. Let <var>scrolling box edge D</var> be the <a>ending edge</a> in the <a>inline base direction</a> of <var>scrolling box</var>, and let <var>element edge D</var> be <var>element bounding border box</var>'s edge on the same physical side as that of <var>scrolling box edge D</var>.
13361336
1. Let <var>element width</var> be the distance between <var>element edge C</var> and <var>element edge D</var>.
13371337
1. Let <var>scrolling box width</var> be the distance between <var>scrolling box edge C</var> and <var>scrolling box edge D</var>.
1338-
1. If <var>scrollMode</var> is "<code>if-needed</code>", and <var>element</var> is entirely in view already, then return.
1338+
1. If <var>scrollMode</var> is "<code>if-hidden</code>", and <var>element</var> is partially or entirely in view already, then return.
13391339

1340-
ISSUE: Define "entirely in view".
1340+
ISSUE: Define "partially or entirely in view".
13411341

13421342
1. If <var>block</var> is undefined, set <var>block</var> to a UA-defined value.
13431343
1. If <var>inline</var> is undefined, set <var>inline</var> to a UA-defined value.

0 commit comments

Comments
 (0)