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

Sidebar nav link issues - multiple click handlers and 3rd level+ nav items #177

Open
lukenofurther opened this issue Apr 9, 2019 · 2 comments

Comments

@lukenofurther
Copy link

Hi,

I've discovered a couple of issues with sidebar nav links in the docs build and have implemented fixes for both on a fork.

Firstly, as you click on links in the nav, the click handlers aren't removed from the nav links, meaning that multiple click handlers build up on each link. You can see this if you put a break point in the activeNav click method. The first time the click handler is called once, the second time twice, and so on. Click handler removal is supposed to happen on line ~72 of the activeNav component.

Secondly, nav items that are greater than 2 levels deep in the nav tree don't work because the click handler doesn't add the vueds-active class to their grandparents.

The commits on my fork branch fix the click handlers thing and adds recursive code that should mean the nav can handle any depth of nav item.

Shall I make a pull request?

@lukenofurther lukenofurther changed the title Sidebar nav link issues - multiple click handlers and 3rd level + nav items Sidebar nav link issues - multiple click handlers and 3rd level+ nav items Apr 10, 2019
@lukenofurther
Copy link
Author

I just added a missing change to the branch on my fork, so it should be working fully now

@alex-belyaev
Copy link

got similar problem after updating to 3.24.2. Tried your fix, it resolves multiple eventlisteners but i still see that vueds-active calss was not added at the first click. So currently your fix doesn't work for me.

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

2 participants