From 78f2775ed037e9707b1606186625e70693f39613 Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Fri, 22 Mar 2019 10:28:03 +0000 Subject: [PATCH] Flip event passive logic on passiveBrowserEventsSupported (#15190) --- packages/react-dom/src/events/ReactDOMEventListener.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-dom/src/events/ReactDOMEventListener.js b/packages/react-dom/src/events/ReactDOMEventListener.js index 32da3c6106147..51897225474d6 100644 --- a/packages/react-dom/src/events/ReactDOMEventListener.js +++ b/packages/react-dom/src/events/ReactDOMEventListener.js @@ -188,11 +188,11 @@ export function trapEventForResponderEventSystem( // and can provide polyfills if needed. if (passive) { if (passiveBrowserEventsSupported) { + eventFlags |= IS_PASSIVE; + } else { eventFlags |= IS_ACTIVE; eventFlags |= PASSIVE_NOT_SUPPORTED; passive = false; - } else { - eventFlags |= IS_PASSIVE; } } else { eventFlags |= IS_ACTIVE;