diff --git a/packages/react-dom-bindings/src/events/ReactDOMEventListener.js b/packages/react-dom-bindings/src/events/ReactDOMEventListener.js index e84dde189a9e1..c93c34b0a28ab 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 b4ad4a926e621..3e91e174c4fd5 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(