Skip to content

Fix double-firing mouseenter#19571

Merged
gaearon merged 3 commits intofacebook:masterfrom
gaearon:fix-mouseenter
Aug 10, 2020
Merged

Fix double-firing mouseenter#19571
gaearon merged 3 commits intofacebook:masterfrom
gaearon:fix-mouseenter

Conversation

@gaearon
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
Contributor

@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
Copy Markdown

sizebot commented Aug 10, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against 4414ed9

@sizebot
Copy link
Copy Markdown

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