refactor: Move hide event to mouseDown
#446
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ref ant-design/ant-design#47671
看了一下过去行为,的确是
mouseDown
关闭更合理。调整一下事件,另外就是过去有一个 test 写的是元素stopPop
可以让 Trigger 不关闭,之后又有一个 bug 是点击了stopPop
元素时 Trigger 没有关闭。这两个本身是矛盾的,按照原生看以无论如何点击就关闭为准。