Skip to content
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

Second click on item removes mm-active class #183

Open
akvaliya opened this issue Aug 12, 2019 · 3 comments
Open

Second click on item removes mm-active class #183

akvaliya opened this issue Aug 12, 2019 · 3 comments

Comments

@akvaliya
Copy link

version:
@Version 3.0.4

Description

When i click on item second time on the same item mm-active class gets removed. This is unexpected behavior. It's breaks requirements to show active page. When menu item doesn't have sub-menu & user clicks on same menu-item it triggers area-expand behavior. which should not be the case since item doesn't contain sub-menu.

@AmirinNS
Copy link

I'm also having this problem. My quick solution is by doing this

$('#metismenu li a').on('click', function(){
    $(this).attr('aria-expanded', 'true')
    $(this).parent().addClass('mm-active')
})

It does not remove active menu when clicking outside the metis menu, which I assume a bug. However for my project it is not bother me at all

@bdkoder
Copy link

bdkoder commented Mar 17, 2022

@AmirinNS,
I am also facing the same issue in the active parent class. Submenus are collapsing but active class not coming on the parent.
BTW your solutions helped me at this time. But it's not a proper solution.
It also has a problem with the toggle.
Thanks.

@bdkoder
Copy link

bdkoder commented Mar 17, 2022

@ll,
Problem solved. It was conflicting with another tab.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants