Skip to content

Commit

Permalink
React events: use passive events where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
necolas committed Apr 19, 2019
1 parent 051513b commit d0c0113
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 d0c0113

Please sign in to comment.