Skip to content

Commit d584fcd

Browse files
authored
React events: use passive events where possible (#15454)
1 parent 051513b commit d584fcd

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

packages/react-events/src/Press.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,7 @@ const targetEventTypes = [
9999
'pointerdown',
100100
'pointercancel',
101101
];
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'];
108103

109104
// If PointerEvents is not supported (e.g., Safari), also listen to touch and mouse events.
110105
if (typeof window !== 'undefined' && window.PointerEvent === undefined) {

0 commit comments

Comments
 (0)