-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify wheel event groups #344
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a first pass at describing wheel event groups. Critiques would be greatly appreciated!
sections/event-types.txt
Outdated
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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if the example text is helpful as is, but I thought some sort of example might clarify things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having examples can be really useful.
I'm not sure what the takeaway is for this example, though. It ends with "could result in unexpected behavior", which makes it sound like a cautionary tale. Is this trying to explain why it is spec'ed this way, or is there something that the user needs to do to avoid the unexpected behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think my goal was "to explain why it is spec'ed this way". Is something like that typical in a spec or just contained to the spec issue and PR? This is also something that is easier to see with an actual example with a scrollable frame with a subframe that preventDefault's wheel events
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO the last sentence is not necessary and might confuse more than clarify.
5c81ac6
to
ad9d8d3
Compare
@@ -2180,11 +2180,12 @@ myDiv.addEventListener("auxclick", function(e) { | |||
+| Sync / Async | Async | | |||
+| Bubbles | Yes | | |||
+| Trusted Targets | <code>Element</code> | | |||
+| Cancelable | <a href="#cancelability-of-wheel-events">Varies</a> | | |||
+| Cancelable | <a href="#cancelability-of-wheel-events">Varies</a> | | |||
+| Composed | Yes | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that this change was not intentional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, removed the change.
sections/event-types.txt
Outdated
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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having examples can be really useful.
I'm not sure what the takeaway is for this example, though. It ends with "could result in unexpected behavior", which makes it sound like a cautionary tale. Is this trying to explain why it is spec'ed this way, or is there something that the user needs to do to avoid the unexpected behavior?
sections/glossary.txt
Outdated
@@ -381,6 +381,12 @@ the definitions for more information. | |||
the [[#conf-interactive-ua]] and [[#conf-author-tools]] for details on the | |||
requirements for a <em>conforming</em> user agent. | |||
|
|||
: <dfn>wheel event group</dfn> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're moving away from having entries in glossary since they are not normative and mostly duplicate definitions that are properly defined elsewhere.
I think this should just be included up with the rest of the text.
ad9d8d3
to
8e4ac6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback!
sections/event-types.txt
Outdated
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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think my goal was "to explain why it is spec'ed this way". Is something like that typical in a spec or just contained to the spec issue and PR? This is also something that is easier to see with an actual example with a scrollable frame with a subframe that preventDefault's wheel events
sections/event-types.txt
Outdated
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make this "MUST" so that it's well-defined what the target
is for wheel
events. The UA-defined timeout allows UAs to not implement the grouping already.
7531f06
to
b00e1f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the last sentence of the example and changed setting the target
to ensure it is well defined.
@@ -2180,11 +2180,12 @@ myDiv.addEventListener("auxclick", function(e) { | |||
+| Sync / Async | Async | | |||
+| Bubbles | Yes | | |||
+| Trusted Targets | <code>Element</code> | | |||
+| Cancelable | <a href="#cancelability-of-wheel-events">Varies</a> | | |||
+| Cancelable | <a href="#cancelability-of-wheel-events">Varies</a> | | |||
+| Composed | Yes | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, removed the change.
See web-platform-tests/wpt#37445 (comment), in particular:
I'll update the text here to use "wheel transaction" instead of "wheel event group" CC @smaug---- |
b00e1f7
to
0315c86
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but needs a rebase.
Specify the behavior of wheel event groups.
0315c86
to
a02da34
Compare
SHA: ee7998e Reason: push, by garykac Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Specify the behavior of wheel event groups.
Closes #338
The following tasks have been completed:
Implementation commitment: