antd menuItem上的icon图标事件失效问题(Icon event Invalidation on antd MenuItem)

表象
当menuitem选中后,menuitem上元素的点击事件失效。

猜测

本来以为是组件库,写了阻断冒泡的方法,检查源码发现,并没有return fasle; 之类阻止冒泡的代码

最终原因

当使用开发者工具检查元素时,发现组件在选中时添加了一个after,并使用了position定位,导致after对item上元素进行了遮挡
故,点不到icon图标。

解决

修改组件库的样式,提高icon所在元素的层级z-index

————————

appearance
When MenuItem is selected, the click event of the element on MenuItem is invalid.

guess

I thought it was a component library. I wrote a method to block bubbling. I checked the source code and found that there was no return fasle; And other code to prevent bubbling

Ultimate cause

When the developer tool is used to check the element, it is found that the component adds an after when it is selected and uses position positioning, resulting in the occlusion of the element on the item by the after
Therefore, the icon icon cannot be clicked.

solve

Modify the style of the component library and increase the level Z-index of the element where the icon is located