Skip to content

Commit ae855ce

Browse files
motiz88philipp-spiess
authored andcommitted
Support tangentialPressure and twist fields of pointer events (#13374)
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`.
1 parent 725e499 commit ae855ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/react-dom/src/events/SyntheticPointerEvent.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ const SyntheticPointerEvent = SyntheticMouseEvent.extend({
1616
width: null,
1717
height: null,
1818
pressure: null,
19+
tangentialPressure: null,
1920
tiltX: null,
2021
tiltY: null,
22+
twist: null,
2123
pointerType: null,
2224
isPrimary: null,
2325
});

0 commit comments

Comments
 (0)