Skip to content

Commit 1d8a797

Browse files
author
Adam Argyle
committed
[cssom-view-1] adds smooth and instant scroll details, keyboard scroll details and a short definition
1 parent 15aaffd commit 1d8a797

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
@@ -337,10 +337,12 @@ the following steps must be run:
337337
'scroll-behavior' property is ''scroll-behavior/smooth''
338338
<li><var>behavior</var> is <code>smooth</code>
339339
</ul>
340-
...then perform a <a>smooth scroll</a> of <var>box</var> to <var>position</var>.
341-
Otherwise, perform an <a>instant scroll</a> of <var>box</var> to <var>position</var>.
340+
...then perform a <a>smooth scroll</a> of <var>box</var> to <var>position</var>. Once the position has finished updating, emit the <a>scrollend</a> event.
341+
Otherwise, perform an <a>instant scroll</a> of <var>box</var> to <var>position</var>. After an <a>instant scroll</a> emit the <a>scrollend</a> event.
342342
</ol>
343343

344+
Scroll is <dfn lt="scroll completed">completed</dfn> when the scroll position has no more pending updates or translations. This includes smooth or instant mouse wheel scrolling, keyboard scrolling, scroll-snap events, or other APIs and gestures which cause the scroll position to update and possibly interpolate.
345+
344346
When a user agent is to perform a <dfn export id=concept-smooth-scroll>smooth scroll</dfn> of a <a>scrolling box</a> <var>box</var> to <var>position</var>,
345347
it must update the scroll position of <var>box</var> in a user-agent-defined fashion over a user-agent-defined amount of time. When the scroll is
346348
<dfn export lt="smooth scroll completed">completed</dfn>, the scroll position of <var>box</var> must be <var>position</var>. The scroll can also
@@ -1709,7 +1711,7 @@ When asked to <dfn export for=Document>run the scroll steps</dfn> for a {{Docume
17091711
<td><dfn event for="Document, Element">scrollend</dfn>
17101712
<td>{{Event}}
17111713
<td>{{Document}}, elements
1712-
<td>Fired at the {{Document}} or element when the <a>viewport</a> or element has been scrolled, the scroll sequence has ended and any scroll offset changes have been applied.
1714+
<td>Fired at the {{Document}} or element when scroll is <dfn lt="scroll completed">completed</dfn>: the <a>viewport</a> or element has been scrolled, the scroll sequence has ended and any scroll offset changes have been applied.
17131715
</table>
17141716

17151717

0 commit comments

Comments
 (0)