-
Notifications
You must be signed in to change notification settings - Fork 47.6k
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/mouseenter event #10149
Fix/mouseenter event #10149
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
I would suspect that the 'sibling' event of |
topLevelType === 'topMouseOver' && | ||
(nativeEvent.relatedTarget || nativeEvent.fromElement) | ||
(topLevelType === 'topMouseOver' && | ||
(nativeEvent.relatedTarget && !nativeEvent.relatedTarget.disabled)) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!nativeEvent.relatedTarget.disabled
- is this needed? I think it wont even be emitted by the browser when relatedTarget
is disabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, its needed. Try to run it
@Andarist #10149 (comment) |
I don't know if this is the right fix. Leaving to @aweary @jquense @nhunzaker to review. |
I'm not sure this fixes the bug...it seems like it's fix an opposite problem. |
Should we close this? |
i think so...I'm trying to specifically identify what is wrong with the test. |
I'll leave this to you then :-P |
Ok sorry I see what's happening. This change causes the plugin to take a path that is meant solely for the "entering an element from outside the browser window". and changes it to "there is an unpaired mouseover". It works for this one case, but I am not certain if it will lead to extra Do any of ya'll know what the situation is on browsers not firing these events. I remember hearing that was starting to change? |
I don't know. Unfortunately I don't think anyone on the team will have a lot of time this half to concentrate on the DOM issues, so if this isn't obviously the right fix, I think we won't take it. |
ya fair enough. I generally thing the "right" fix is to use the native events Thanks for the PR @stepancar we want to try and address these mouseenter/leave issues a bit more holistically. I appreciate the contribution and if you'r interested please join in the conversation on #11972 addendum: This is a really shaky part of the react codebase, and while generally we want to take any fixes to bugs, even if they are short term ones. It's also more dangerous than normal to mess with this code and can end up causes more issues in other places we didn't see due to not great coverage. So we take a far more cautious approach here than we might otherwise |
Fix for #10109