-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add type definitions for pointer events #6728
Conversation
While working on facebook/flow#6728 I noticed React's recently-added `SyntheticPointerEvent` was missing the [`tangentialPressure`](https://www.w3.org/TR/pointerevents/#dom-pointerevent-tangentialpressure) and [`twist`](https://www.w3.org/TR/pointerevents/#dom-pointerevent-twist) fields. I couldn't find any reason for their omission in #12507 (nor in the spec) so I assume they were meant to be included, like the rest of `PointerEvent`. This PR adds these two fields to `SyntheticPointerEvent`.
This is based on facebook/react#12507 which is seemingly missing a couple of fields from the official spec. Consequently this will need an update once React supports all fields.
facebook/react#13374 has been merged so the next React DOM release will have these fields.
1708247
to
5c63180
Compare
Oh wait, this is a separate PR? I definitely commented on another one by you with some of these commits earlier. EDIT: gotcha, the reference to #6727 is right above this comment haha (whew, coffee come at me). |
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.
mrkev has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
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.
mrkev has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
For future reference: The corresponding React fix was released as part of 16.5.0. |
Closes #6373, closes #3227.
The definition of
SyntheticPointerEvent
here was originally based on facebook/react#12507 (released in React DOM 16.4.0) which was missing a couple of fields (twist
andtangentialPressure
) from the official spec.I've now updated this branch to include those fields, since facebook/react#13374 has been merged. However, for maximum correctness we should probably wait for that to be released before releasing the corresponding type definitions. I'll update this notice once the relevant React DOM release happens.