Submenu doesn't automatically close when an item is clicked
See original GitHub issueIssue Description
I noticed that the .menubar-menu-container doesn’t automatically close when any of its .action-menu-item is clicked.
Is there a proper way for this?
I tried:
$('menubar-menu-button').removeClass('open')
$('.menubar-menu-container').remove()
But since it would still think that the menu is open, I’m getting new issues:
- Hovering above the other menu items will open its submenu
- The submenu will only open after at least 2 clicks.
Any thoughts?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How can I close a submenu automatically by clicking on other ...
What you can do is first on click of sub-menu hide all menu inside submenu than toggle ul find more in below snippet....
Read more >[OutSystems UI] Submenu auto close after clicking a button or ...
I wrote some Javascript in OnReady of the Menu to add class "open" to the active menu element to keep the submenu items...
Read more >How to prevent sub-menu items from closing sub-menu?
My problem is that I can open the dropdown submenu (the “my dropdown li”'s) but when I got to click on any of...
Read more >Submenu is closing automatically when mouse over ... - Telerik
Submenu is closing automatically when mouse over to different parent menu item in radmenu even though click to open is set to Yes....
Read more >Control whether Menu closes on Menu.Item click #152 - GitHub
Hi there! I have a use case for the Menu component where I don't necessarily want the Menu to close when I click...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Turns out, you don’t need a workaround. This worked but what the heck!
Just place
titlebar.updateMenu(menu);
inside your click handler function, preferably at the end of the function. Weird!I have this issue in
3.2.2-hotfix62
when clicking a submenu item. So clickingFile -> Foo -> Bar
executes theclick
function but the menu stays visible. ClickingFile -> Cheese
on the other hand executes theclick
function and closes the menu as expected.