-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
toggle doesn't work when no sub-menu is present #20
Comments
I have the same problem, I tried the new version 2.0.0 and the behaviour is the same in all versions. Thanks. |
+1, please can you fix it? Thanks in advance! |
Same here! Any fixes? |
I have same problem. Sub of sub menu is not collapse when I click root menu to close toggle. from code when I click menu "Admin" and click "MANAGEMENT". After that I click Admin for toggle close of all the menu "MANAGEMENT" level is toggle close. But "ROLE GROUP, ROLE, USER" is not close toggle. Could you please fix that? update : from version 1.1.3 i change from |
Same problem here. I'm using this with ember.js which uses single page routing, the toggle function does not work. Any fix for this? Also. Going directly to a hash based route (http://dom.com/#/some/route) causes the menu to be fully expanded on load. Not sure if this is an issue with my setup, or with the plugin itself. |
I managed to fix the specific problem I was having by adding another "click" listener for the sub menu links.
As for my second issue, it actually came down to having some matching (temporary) links that were going to "#", which matched the current page, so the plugin was marking them "active" and expanding the groups. Not really an issue with the plugin itself. |
+1 |
Hi, here is a listener to inject into metisMenu which works fine. var that = this;
this.$element.children('li').not(':has(ul)').children('a').on('click.metisMenu', function(e) {
if ($this.options.toggle) {
var $parent = that.$element.find('ul.in');
$this.hide($parent);
}
}); |
Hello there, I'm having an issue similar to the one reported by @laszlof and I haven't been able to find the solution yet. I doesn't matter how deep the menu is, when the url ends with a hashtag (http://localhost/myApp/# as an example) the entire menu is fully expanded on load. Any thoughts on how to solve it?. |
Any solution to this? Thanks!! |
Replace your dummy href="#" with href="#any-word", worked for me. :) |
I think I have this problem too. My menu have some menus without submenus and some menus with submenus. When a menu with submenu is open, and I click on a menu without submenu, the previous menu with submenu open doesn't collapse. |
Please fix this! The fix from slimsoft from over a year ago works, why hasn't it been integrated? I don't want to edit a node module! |
Please fix it! |
I still have the same issue using the parent-toggle branch. |
I have the same bug.. |
Wow... what an old bug! I'm having this trouble now and just discovered this is here over 3 years! |
News? |
Hi! @onokumus Check de PR |
Hi, I found out that toggle doesn't work right with items that don't have sub-menus.
For example:
The problem is line
37
in the code:Everything works fine when I remove
.has("ul")
from the code.The thing is I'm working with angular and not using direct links but routing based on my location, so even when the link doesn't have a sub-menu, it still doesn't go to a new page but should toggle the other menus.
Cheers,
Jan Fucik
The text was updated successfully, but these errors were encountered: