Fix event replaying logic (#19269)

This commit is contained in:
Dominic Gannaway authored and GitHub committed 2020-07-07 02:28:55 +01:00
1 parent 91a2e8173f
commit 97b96da295
1 file changed
+6 -2
+6 -2
View File
@@ -135,7 +135,10 @@ import {
TOP_BLUR,
} from './DOMTopLevelEventTypes';
import {IS_REPLAYED, PLUGIN_EVENT_SYSTEM} from './EventSystemFlags';
import {listenToTopLevelEvent} from './DOMModernPluginEventSystem';
import {
listenToTopLevelEvent,
capturePhaseEvents,
} from './DOMModernPluginEventSystem';
import {addResponderEventSystemEvent} from './DeprecatedDOMEventResponderSystem';
type QueuedReplayableEvent = {|
@@ -236,12 +239,13 @@ function trapReplayableEventForContainer(
container: Container,
listenerMap: ElementListenerMap,
) {
const capture = capturePhaseEvents.has(topLevelType);
listenToTopLevelEvent(
topLevelType,
((container: any): Element),
listenerMap,
PLUGIN_EVENT_SYSTEM,
false,
capture,
);
}