Skip to content

Conversation

@ddbeck
Copy link
Collaborator

@ddbeck ddbeck commented Jun 19, 2024

This is an old feature, but created to capture api.MouseEvent.movement{X,Y} that were under the pointer-lock feature. 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

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
Copy link
Contributor

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

@ddbeck ddbeck requested a review from foolip July 2, 2024 11:29
@@ -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.
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

baseline_low_date: 2015-07-29
baseline_high_date: 2018-01-29
support:
chrome: "2"
Copy link
Collaborator

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done with de47eb1.

@ddbeck ddbeck requested a review from foolip July 8, 2024 14:02
@foolip foolip merged commit 787022f into web-platform-dx:main Jul 8, 2024
@bsmth
Copy link
Contributor

bsmth commented Jul 10, 2024

Thank you, both

@ddbeck ddbeck deleted the mouse-events branch July 10, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature definition Creating or defining new features or groups of features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants