@samitouri / QOS-React-2 / commits / d584fcdc6e

React events: use passive events where possible (#15454)

Nicolas Gallagher committed Apr 19, 2019 at 13:09 UTC d584fcdc6e10b9f4d4e9eec775731e7ffc0fb501
1 file changed +1 -6
packages/react-events/src/Press.js
+1 -6
@@ -99,12 +99,7 @@ const targetEventTypes = [
99 'pointerdown',
100 'pointercancel',
101 ];
102 -const rootEventTypes = [
103 - {name: 'keyup', passive: false},
104 - {name: 'pointerup', passive: false},
105 - 'pointermove',
106 - 'scroll',
107 -];
102 +const rootEventTypes = ['keyup', 'pointerup', 'pointermove', 'scroll'];
103
104 // If PointerEvents is not supported (e.g., Safari), also listen to touch and mouse events.
105 if (typeof window !== 'undefined' && window.PointerEvent === undefined) {