Skip to content

Modern Event System: register onMouseEnter for portals#18720

Merged
trueadm merged 1 commit intofacebook:masterfrom
trueadm:fix-enter-leave
Apr 23, 2020
Merged

Modern Event System: register onMouseEnter for portals#18720
trueadm merged 1 commit intofacebook:masterfrom
trueadm:fix-enter-leave

Conversation

@trueadm
Copy link
Copy Markdown
Contributor

@trueadm trueadm commented Apr 23, 2020

We found an issue internally with the modern event system and onMouseEnter/onMouseLeave. Specifically, this issue occurs when we have a portal that is outside of the React root. Given we don't listen to events on the document, we need to know when an inner mouseEnter/mouseLeave traverses up through a portal to a parent that has this plugin in-use. If the portal doesn't have these event listeners attached too, then this never happens.

I've added a repro test that demonstrates this.

@trueadm trueadm requested review from gaearon and sebmarkbage April 23, 2020 19:34
@trueadm trueadm requested a review from bvaughn April 23, 2020 19:35
@facebook-github-bot facebook-github-bot added the React Core Team Opened by a member of the React Core Team label Apr 23, 2020
@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci bot commented Apr 23, 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 a19253b:

Sandbox Source
jovial-chaplygin-6tx0b Configuration

@sizebot
Copy link
Copy Markdown

sizebot commented Apr 23, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against a19253b

@sizebot
Copy link
Copy Markdown

sizebot commented Apr 23, 2020

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against a19253b

@trueadm trueadm merged commit 30cee2f into facebook:master Apr 23, 2020
@trueadm trueadm deleted the fix-enter-leave branch April 23, 2020 19:57
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.

4 participants