-
Notifications
You must be signed in to change notification settings - Fork 202
Create a mouse-events feature
#1263
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
Conversation
This is an old feature, but created to capture
`api.MouseEvent.movement{X,Y}` that, until this commit, were under the
`pointer-lock` feature. The properties work independently of pointer
lock, so it makes sense for them to live somewhere else.
This was prompted by mdn/content#34263.
| - api.MouseEvent.relatedTarget | ||
| - api.MouseEvent.screenX | ||
| - api.MouseEvent.screenY | ||
| - api.MouseEvent.shiftKey |
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.
Most of these look good to me based on the spec and looks like everything predating pointer events -> https://www.w3.org/TR/2019/WD-pointerevents3-20191212/#intro
features/mouse-events.yml
Outdated
| @@ -0,0 +1,52 @@ | |||
| name: Mouse events | |||
| description: Mouse events, such as `click`, `mousedown`, or `mousemove`, fire when users interact with a pointing device such a mouse or trackpad. | |||
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.
For site compat reasons the events also fire when interacting with touch screens, although in that case touch events are also fired. And pointer events. I'm not sure how much to say, WDYT?
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.
No reason not to mention touch screens as well, but I don't think we need to talk about the intersection of touch/mouse events here. Done with 1f1e66d.
features/mouse-events.yml.dist
Outdated
| baseline_low_date: 2015-07-29 | ||
| baseline_high_date: 2018-01-29 | ||
| support: | ||
| chrome: "2" |
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.
Without doing any research I'm confident this should be the earliest release of all browsers. Mouse events are ancient, and there's no chance that they were so broken in any browser released since 2003 (Safari 1) that we should consider them not supported.
At the same time I don't want to spend any time researching the small differences here. How about just compute_from: api.MouseEvent and a comment/TODO?
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.
Done with de47eb1.
|
Thank you, both |
This is an old feature, but created to capture
api.MouseEvent.movement{X,Y}that were under thepointer-lockfeature. The properties work independently of pointer lock, so it makes sense for them to live somewhere else, with a better support history than pointer lock's.This will need follow up after #1227 (or something like it) merges. See the diff for details.This was prompted by mdn/content#34263
cc: @bsmth