File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -576,6 +576,8 @@ export function generateTrigger(
576576
577577 if ( hoverToShow ) {
578578 const onMouseEnterCallback = ( event : React . MouseEvent ) => {
579+ // Clear any delayed close operations
580+ clearDelay ( ) ;
579581 setMousePosByEvent ( event ) ;
580582 } ;
581583
@@ -596,6 +598,9 @@ export function generateTrigger(
596598 ) ;
597599
598600 onPopupMouseEnter = ( event ) => {
601+ // Always clear the delay to ensure the mouse returns to the menu to cancel the close
602+ clearDelay ( ) ;
603+
599604 // Only trigger re-open when popup is visible or in motion
600605 // and ensure the mouse is entering the popup area
601606 if (
@@ -630,11 +635,8 @@ export function generateTrigger(
630635 ignoreMouseTrigger ,
631636 ) ;
632637
633- onPopupMouseLeave = ( event : React . MouseEvent ) => {
634- // fix issue: https://github.com/ant-design/ant-design/issues/54496
635- if ( popupEle ?. contains ( event . target as HTMLElement ) ) {
636- triggerOpen ( false , mouseLeaveDelay ) ;
637- }
638+ onPopupMouseLeave = ( ) => {
639+ triggerOpen ( false , mouseLeaveDelay ) ;
638640 } ;
639641 }
640642
You can’t perform that action at this time.
0 commit comments