From ae855cec2207a1097dd2115dac96340d1261726f Mon Sep 17 00:00:00 2001 From: Moti Zilberman Date: Sun, 12 Aug 2018 14:16:23 +0100 Subject: [PATCH] Support tangentialPressure and twist fields of pointer events (#13374) While working on https://github.com/facebook/flow/pull/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 https://github.com/facebook/react/pull/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`. --- packages/react-dom/src/events/SyntheticPointerEvent.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-dom/src/events/SyntheticPointerEvent.js b/packages/react-dom/src/events/SyntheticPointerEvent.js index 96a488f186..3654d9829a 100644 --- a/packages/react-dom/src/events/SyntheticPointerEvent.js +++ b/packages/react-dom/src/events/SyntheticPointerEvent.js @@ -16,8 +16,10 @@ const SyntheticPointerEvent = SyntheticMouseEvent.extend({ width: null, height: null, pressure: null, + tangentialPressure: null, tiltX: null, tiltY: null, + twist: null, pointerType: null, isPrimary: null, });