-
-
Notifications
You must be signed in to change notification settings - Fork 225
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: Not trigger enter open for portal element #442
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #442 +/- ##
==========================================
+ Coverage 97.74% 97.87% +0.13%
==========================================
Files 13 13
Lines 797 799 +2
Branches 224 226 +2
==========================================
+ Hits 779 782 +3
+ Misses 18 17 -1 ☔ View full report in Codecov by Sentry. |
tests/portal.test.jsx
Outdated
import React, { createRef, StrictMode } from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import Trigger from '../src'; | ||
import { awaitFakeTimer, placementAlignMap } from './util'; |
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.
import { awaitFakeTimer, placementAlignMap } from './util'; | |
import { placementAlignMap } from './util'; |
if (mergedOpen || inMotion) { | ||
if ( | ||
(mergedOpen || inMotion) && | ||
popupEle?.contains(event.target as HTMLElement) |
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.
popupEle 不存在会是什么场景?
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.
防止别人手工去调用 onMouseEnter
,防御性的。
resolve ant-design/ant-design#47093