diff --git a/packages/react-dom-bindings/src/events/ReactDOMEventListener.js b/packages/react-dom-bindings/src/events/ReactDOMEventListener.js index ae1e981d8c1d1..6fa9f1deb90c5 100644 --- a/packages/react-dom-bindings/src/events/ReactDOMEventListener.js +++ b/packages/react-dom-bindings/src/events/ReactDOMEventListener.js @@ -155,12 +155,7 @@ export function dispatchEvent( return; } - let blockedOn = findInstanceBlockingEvent( - domEventName, - eventSystemFlags, - targetContainer, - nativeEvent, - ); + let blockedOn = findInstanceBlockingEvent(nativeEvent); if (blockedOn === null) { dispatchEventForPluginEventSystem( domEventName, @@ -198,12 +193,7 @@ export function dispatchEvent( if (fiber !== null) { attemptSynchronousHydration(fiber); } - const nextBlockedOn = findInstanceBlockingEvent( - domEventName, - eventSystemFlags, - targetContainer, - nativeEvent, - ); + const nextBlockedOn = findInstanceBlockingEvent(nativeEvent); if (nextBlockedOn === null) { dispatchEventForPluginEventSystem( domEventName, @@ -240,9 +230,6 @@ export let return_targetInst: null | Fiber = null; // Returns a SuspenseInstance or Container if it's blocked. // The return_targetInst field above is conceptually part of the return value. export function findInstanceBlockingEvent( - domEventName: DOMEventName, - eventSystemFlags: EventSystemFlags, - targetContainer: EventTarget, nativeEvent: AnyNativeEvent, ): null | Container | SuspenseInstance { // TODO: Warn if _enabled is false. diff --git a/packages/react-dom-bindings/src/events/ReactDOMEventReplaying.js b/packages/react-dom-bindings/src/events/ReactDOMEventReplaying.js index 660bb0a942749..b6464749ab861 100644 --- a/packages/react-dom-bindings/src/events/ReactDOMEventReplaying.js +++ b/packages/react-dom-bindings/src/events/ReactDOMEventReplaying.js @@ -376,13 +376,7 @@ function attemptReplayContinuousQueuedEvent( } const targetContainers = queuedEvent.targetContainers; while (targetContainers.length > 0) { - const targetContainer = targetContainers[0]; - const nextBlockedOn = findInstanceBlockingEvent( - queuedEvent.domEventName, - queuedEvent.eventSystemFlags, - targetContainer, - queuedEvent.nativeEvent, - ); + const nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent); if (nextBlockedOn === null) { const nativeEvent = queuedEvent.nativeEvent; const nativeEventClone = new nativeEvent.constructor(