ant-design/ant-design
在 GitHub 查看Menu horizontal Submenu closes when cursor crossing from item to popup
Open
#40,337 建立於 2023年1月19日
Inactivehelp wantedunconfirmed
描述
Reproduction link
Steps to reproduce
Open Menu dropdown and place cursor about on bottom border of the item and above the popup, or move cursor across from item to popup slowly
What is expected?
Submenu to stay open while crossing from Item to Submenu
What is actually happening?
Sometimes Submenu closes unexpectedly, depends on how fast and precise user moves mouse cursor
| Environment | Info |
|---|---|
| antd | 5.1.5 |
| React | 18 |
| System | windows |
| Browser | Firefox, Chrome |
Two places to fix:
Adding "pointer-events: none" to Item's css :after rule (to its bottom line)
And syncing Popup's Align offset with popup's css :before rule. For now, Popup Align has offset 8px, but in css the offset is -7px, which should be the same -8px.