Skip to content

Commit

Permalink
React events: use passive events where possible (#15454)
Browse files Browse the repository at this point in the history
  • Loading branch information
necolas authored Apr 19, 2019
1 parent 051513b commit d584fcd
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/react-events/src/Press.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d584fcd

Please sign in to comment.