我一直在遇到一个问题,如果我悬停在百叶窗上,然后在类型,房间,颜色等之间单击,导致NAV随机关闭。
我知道它为什么要关闭,这就是因为.site-navigation
元素在鼠标离开组件时具有熔点事件,以关闭Mega Nav。
elSiteNav.addEventListener('mouseleave', handleSiteNavMouseEvent);
复制非常棘手,但是一旦复制,问题就会经常发生。
url:https://www.hillarys.co.uk/
浏览器:Chrome
在handlesitenavmouseeevent函数中使用stoppropagation
handleSiteNavMouseEvent(event){
event.stopPropagation();
}