Skip to content

Support tangentialPressure and twist fields of pointer events - #13374

Merged
philipp-spiess merged 1 commit into
react:masterfrom
motiz88:pointer-event-fields
Aug 12, 2018
Merged

philipp-spiess merged 1 commit into
react:masterfrom
motiz88:pointer-event-fields

Conversation

@motiz88

@motiz88 motiz88 commented Aug 12, 2018

Copy link
Copy Markdown
Contributor

While working on meta/flow#6728 I noticed React's recently-added SyntheticPointerEvent was missing the tangentialPressure and 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.

@philipp-spiess philipp-spiess left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR! 🎉

This seems like an oversight on my end. Those properties are in the spec since 2016 - the oldest version I could find. I think we should support them as well. 👍

@philipp-spiess
philipp-spiess merged commit ae855ce into react:master Aug 12, 2018
@motiz88
motiz88 deleted the pointer-event-fields branch August 12, 2018 13:24
motiz88 added a commit to motiz88/flow that referenced this pull request Aug 12, 2018
react/react#13374 has been merged so the next
React DOM release will have these fields.
motiz88 added a commit to motiz88/flow that referenced this pull request Aug 12, 2018
react/react#13374 has been merged so the next
React DOM release will have these fields.
facebook-github-bot pushed a commit to meta/flow that referenced this pull request Sep 5, 2018
Summary:
Closes #6373, closes #3227.

The definition of `SyntheticPointerEvent` here was originally based on react/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 react/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.
Pull Request resolved: #6728

Reviewed By: fishythefish

Differential Revision: D9338459

Pulled By: mrkev

fbshipit-source-id: 263f4922e8a6765e4a2d6553b5af785bdc65a894
@gaearon gaearon mentioned this pull request Sep 5, 2018
gaearon pushed a commit to reactjs/react.dev that referenced this pull request Sep 8, 2018
OhIAmFine pushed a commit to OhIAmFine/zh-hans.reactjs.org that referenced this pull request May 6, 2019
mrizwanashiq pushed a commit to mrizwanashiq/ur.react.dev that referenced this pull request Jun 25, 2026
mrizwanashiq pushed a commit to mrizwanashiq/react that referenced this pull request Jun 25, 2026
…13374)

While working on meta/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 react#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`.
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
…13374)

While working on meta/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 react#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`.
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.

3 participants