Skip to content

Commit 6d4d97f

Browse files
authored
Update EnterLeaveEventPlugin.js
1 parent 359df2f commit 6d4d97f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

packages/react-dom/src/events/plugins/EnterLeaveEventPlugin.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,8 @@ function extractEvents(
150150

151151
let enter: KnownReactSyntheticEvent | null = null;
152152

153-
// If we are processing the first ancestor, then we
154-
// should process the same nativeEvent again, as we
155-
// will have already processed it in the first ancestor.
153+
// We should only process this nativeEvent if we are processing
154+
// the first ancestor. Next time, we will ignore the event.
156155
const nativeTargetInst = getClosestInstanceFromNode((nativeEventTarget: any));
157156
if (nativeTargetInst === targetInst) {
158157
const enterEvent: KnownReactSyntheticEvent = new SyntheticEvent(

0 commit comments

Comments
 (0)