Add type definitions for pointer events#6728
Closed
motiz88 wants to merge 4 commits intofacebook:masterfrom
Closed
Add type definitions for pointer events#6728motiz88 wants to merge 4 commits intofacebook:masterfrom
motiz88 wants to merge 4 commits intofacebook:masterfrom
Conversation
philipp-spiess
pushed a commit
to facebook/react
that referenced
this pull request
Aug 12, 2018
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
9 tasks
Contributor
|
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). |
Contributor
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
mrkev has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
mrkev has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Contributor
Author
|
For future reference: The corresponding React fix was released as part of 16.5.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #6373, closes #3227.
The definition of
SyntheticPointerEventhere was originally based on facebook/react#12507 (released in React DOM 16.4.0) which was missing a couple of fields (twistandtangentialPressure) 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.