Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix double-firing mouseenter #19571

Merged
merged 3 commits into from Aug 10, 2020
Merged

Fix double-firing mouseenter #19571

merged 3 commits into from Aug 10, 2020

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Aug 10, 2020

Fixes #19562.

Uses a test from #19567.

I think the intention of the original code was to detect if the node is in the React tree, but it didn't check for the root node. So if we got an event with relatedTarget being the container node itself, we would fail to filter it out.

@facebook-github-bot facebook-github-bot added the React Core Team Opened by a member of the React Core Team label Aug 10, 2020
@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 10, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 4414ed9:

Sandbox Source
React Configuration
mouseenter in react@next Issue #19562
mouseenter in react@16.13.1 Issue #19562

Copy link
Collaborator

@sebmarkbage sebmarkbage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The perf of this 😬🥺

@sizebot
Copy link

sizebot commented Aug 10, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against 4414ed9

@sizebot
Copy link

sizebot commented Aug 10, 2020

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against 4414ed9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: mouseEnter fires twice in react@next
5 participants