mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
React events: use passive events where possible (#15454)
This commit is contained in:
Vendored
+1
-6
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user