ant-design Dropdown下拉菜单hover移动到菜单稍快,菜单会立即消失 | Dropdown menu disappear

2ledvvac  于 2022-10-25  发布在  其他
关注(0)|答案(2)|浏览(731)
  • I have searched the issues of this repository and believe that this is not a duplicate.

https://ant.design/components/dropdown-cn/

Steps to reproduce

代码演示的第一个从Hover me菜单hover后稍快移动到菜单,菜单则消失
The first code demonstration
Moves from the Hoverme button, menu disappears quickly after hover

What is expected?

菜单不消失
The menu does not disappear

What is actually happening?

菜单消失
the menu disappears

EnvironmentInfo
antd4.13.0
ReactReact:v17.0.1
Systemwindow10
Browser谷歌v 88.0.4324.190
ddrv8njm

ddrv8njm1#

嗯,动画过程中下拉菜单是 pointer-event: none 的。这是为了解决元素过早交互的问题。看起来需要换种方式实现。

50few1ms

50few1ms2#

从antd 4.13.0开始,X6库的menu组件,class多了slide相关的,style多了一个pointer-event: none,导致menu item无法点击。
是不是改了这块逻辑?

相关问题