You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A content author does not necessarily want <a>scroll chaining</a> to occur for all <a>scroll containers</a>. Some <a>scroll containers</a> may be part of a <a>containing block chain</a> but may serve a different logical purpose in the document and may want to prevent scrolling from continuing up the <a>scroll chain</a>. To achieve this, a content author will install event listeners without the <a>passive flag</a> set and will use <a>preventDefault</a> when there is a risk that scroll chaining will occur. This is detrimental for the following reasons:
39
37
* The user agent may in the future introduce new input methods for scrolling that are not supported by the content author's event listeners.
40
38
* A non passive event listener will delay scrolling because the user agent will have to wait for the result of the event listener to determine if <a>preventDefault</a> was called causing increased scroll latency.
41
-
* When scrolling is performed near the edge of the <a>scroll boundary<a>, the <a>default action</a> may cause both scrolling to the edge of the <a>scroll container</a> and a <a>boundary default action</a>. Calling <a>preventDefault</a> will not only cancel the <a>boundary default action</a> but also the scroll to the edge of the <a>scrollport</a>.
39
+
* When scrolling is performed near the edge of the <a>scroll boundary</a>, the <a>default action</a> may cause both scrolling to the edge of the <a>scroll container</a> and a <a>boundary default action</a>. Calling <a>preventDefault</a> will not only cancel the <a>boundary default action</a> but also the scroll to the edge of the <a>scrollport</a>.
42
40
* The <a>default action</a> for the event may also provide additional behavior that the author does not want to cancel such as an overscroll affordance. <a>preventDefault</a> doesn't allow the content author to cancel only some of the <a>default actions</a> such as scroll chaining.
43
41
44
-
Thus, it is not possible for a content author to control <a>scroll chaining</a> and overscroll in a robust, performant and forward compatible way. The <a>scroll-boundary-behavior</a> property fixes this shortcoming.
42
+
Thus, it is not possible for a content author to control <a>scroll chaining</a> and overscroll in a robust, performant and forward compatible way. The 'scroll-boundary-behavior' property fixes this shortcoming.
45
43
46
44
<pre class=example>
47
45
A 'position: fixed' left navigation bar may not want to hand off scrolling to the
A <dfn>scroll chain</dfn> is the order in which scrolling is propagated from one <a>scroll container</a> to another.
59
57
60
-
<dfn>Scroll boundary</dfn> refers to when the scroll position of a <a>scroll container</a> reaches the edge of the <a>scrollport<a>. If a scroll container has no potential to scroll, because it does not <a>overflow</a> in the direction of the scroll, the element is always considered to be at the scroll boundary.
58
+
<dfn>Scroll boundary</dfn> refers to when the scroll position of a <a>scroll container</a> reaches the edge of the <a>scrollport</a>. If a scroll container has no potential to scroll, because it does not <a>overflow</a> in the direction of the scroll, the element is always considered to be at the scroll boundary.
61
59
62
-
<dfn>Boundary default action</dfn> refers to the user-agent-defined <a>default action</a> performed when scrolling against the edge of the <a>scrollport</a>. A <a>boundary default action</a> is said to be <dfn>local</dfn>, for example overscroll, if it is performed on the <a>scroll container</a> without interacting with the page. Conversely, a <dfn>non-local boundary default action</dfn> will interact with the page such as scroll chaining or a navigation action.
60
+
<dfn>Boundary default action</dfn> refers to the user-agent-defined <a>default action</a> performed
61
+
when scrolling against the edge of the <a>scrollport</a>. A <dfn>local boundary default action</dfn>
62
+
is a <a>boundary default action</a> which is performed on the <a>scroll container</a> without
63
+
interacting with the page, for example displaying a overscroll UI affordance. Conversely, a <dfn
64
+
>non-local boundary default action</dfn> interacts with the page, for example scroll chaining or a
65
+
navigation action.
63
66
64
67
Overview {#overview}
65
68
==========================
@@ -75,8 +78,8 @@ Note: This property should provide guarantees that are, at least, as strong as <
0 commit comments