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

This commit is contained in:
Nicolas Gallagher
2019-04-19 13:09:03 -07:00
committed by GitHub
parent 051513bfa0
commit d584fcdc6e
+1 -6
View File
@@ -99,12 +99,7 @@ const targetEventTypes = [
'pointerdown',
'pointercancel',
];
const rootEventTypes = [
{name: 'keyup', passive: false},
{name: 'pointerup', passive: false},
'pointermove',
'scroll',
];
const rootEventTypes = ['keyup', 'pointerup', 'pointermove', 'scroll'];
// If PointerEvents is not supported (e.g., Safari), also listen to touch and mouse events.
if (typeof window !== 'undefined' && window.PointerEvent === undefined) {