jQuery menu does not de-select and collapse if exit right
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 11.3k
- Forks
- 5.2k
- PR merge metrics
- No merged PRs in 30d
Description
This bug is causing me problems, and can also clearly be seen on the demo at the bottom of https://api.jqueryui.com/menu/.
In a nutshell, a menu item with a submenu is not deselected, and the submenu remains open, if you exit over the submenu.
In the demo, if you hover Item 3 its submenu opens. If you then move the mouse right a submenu item is selected. Keep moving the mouse right beyond the submenu, and that submenu item is deselected. However the submenu remains open and the parent item remains selected.
This does not happen if you exit Item 3 up, down, or left, i.e. without highlighting a submenu item. It appears visually as if there is only one level of select being cleared.
In my own use, I have tried hiding on blur or mouse leave events but it is tricky as you also get these events when moving from the item to the sub-menu.
PS This is in Chrome 95.0.4638.54 on Ubuntu 16.04. Confirmed that it also occurs in Firefox on same platform.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior in the menu demo at https://api.jqueryui.com/menu/ using the hover path described in the issue, then trace the menu interaction handling for submenu entry and exit. Done means moving right beyond a submenu clears both the submenu and its parent selection, while moving between the parent item and submenu still keeps the menu open.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100