Skip to content

Commit

Permalink
Specify wheel event groups
Browse files Browse the repository at this point in the history
Specify the behavior of wheel event groups.
  • Loading branch information
dlrobertson committed May 10, 2023
1 parent 71fa963 commit 8e4ac6b
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion sections/event-types.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2023,6 +2023,21 @@ myDiv.addEventListener("auxclick", function(e) {
deltaY value respectively).
</p>

A <a>user agent</a> SHOULD create a <a>wheel event group</a> when the first wheel event
is fired, so that all subsequent wheel events within a implementation-specific amount of
time can be targetted at the same element. A <dfn>wheel event group</dfn> is series of
wheel events that are associated with a single user gesture. The <a>wheel event group</a>
MUST have an associated event target that is the <a>topmost event target</a> at the time
the first wheel event occurs in the group.

<p class="example">
If a series of wheel events targetted in a scrollable element start
above a child element, later events for the same user gesture may
occur over the child element. In the case that {{Event/preventDefault()}}
is called in a wheel event handler for the child element, targetting
the child element could result in unexpected behavior for the user.
</p>

<h4 id="interface-wheelevent">Interface WheelEvent</h4>

<p class="intro-dom">Introduced in this specification</p>
Expand Down Expand Up @@ -2184,7 +2199,8 @@ myDiv.addEventListener("auxclick", function(e) {
+| Composed | Yes |
+| Default action | Scroll (or zoom) the document |
+| Context<br/> | <ul> |
| (trusted events) | <li>{{Event}}.{{Event/target}} : <a>topmost event target</a></li> |
| (trusted events) | <li>{{Event}}.{{Event/target}} : element target for the current |
| | <a>wheel event group</a> |
| | <li>{{UIEvent}}.{{UIEvent/view}} : <a><code>Window</code></a></li> |
| | <li>{{UIEvent}}.{{UIEvent/detail}} : <code>0</code></li> |
| | <li>{{MouseEvent}}.{{MouseEvent/screenX}} : if the wheel is associated with a |
Expand Down

0 comments on commit 8e4ac6b

Please sign in to comment.