jQuery-contextMenu icon indicating copy to clipboard operation
jQuery-contextMenu copied to clipboard

Sometimes parent items of submenus lose hover class even though child item is hovered

Open geigel opened this issue 7 years ago • 1 comments

Let me start by saying I am generating a contextmenu dynamically. I doubt, however, that that changes the issue I have.

I have noticed that sometimes if I have a contextmenu that has a submenu, and then make the submenu visible (by hovering over it's parent item) then move my mouse over the parent item again and off of it, then the parent item's hover class is removed from the DOM--which is expected behavior since the item is no longer hovered/highlighted.

But if in my same mouse movement (taking care not to touch the parent menu) and move my mouse around that to the submenu that is still visible and hover one of those items, then the submenu items highlight as expected, but the parent item which has the submenu does not highlight. The expected behavior is that whenever a submenu item is hovered, then the parent menu items above the submenu should also be highlighted.

I have confirmed this issue while testing and investigating the DOM elements. Sometimes (not always) the parent item does not have the hover class added to it.

geigel avatar Oct 17 '17 01:10 geigel

Yeah i've seen this behaviour sometimes. Not entirely sure how to fix it, but i'll have a go again at looking for a solution.

bbrala avatar Oct 19 '17 10:10 bbrala