Skip to content
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

Closed
wants to merge 4 commits into from

Conversation

motiz88
Copy link
Contributor

@motiz88 motiz88 commented Aug 12, 2018

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 and tangentialPressure) 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.

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.
@motiz88 motiz88 force-pushed the pointer-events-6373 branch from 1708247 to 5c63180 Compare August 12, 2018 20:39
@motiz88 motiz88 mentioned this pull request Aug 12, 2018
9 tasks
@mrkev
Copy link
Contributor

mrkev commented Aug 15, 2018

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).

@mrkev
Copy link
Contributor

mrkev commented Aug 15, 2018

Anyway, importing to keep tabs on it.

I'll update this notice once the relevant React DOM release happens.

@me when you think this is ready to merge 👍

EDIT: @me is an acutal user. I wonder how many times you get accidentally pinged, @me hahah

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a 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.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a 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.

@motiz88
Copy link
Contributor Author

motiz88 commented Sep 8, 2018

For future reference: The corresponding React fix was released as part of 16.5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for pointer events. Implement PointerEvent interface.
4 participants