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

Multiple Tabs can become .active at once #20027

Closed
Manuellama opened this issue Jun 3, 2016 · 1 comment
Closed

Multiple Tabs can become .active at once #20027

Manuellama opened this issue Jun 3, 2016 · 1 comment
Labels

Comments

@Manuellama
Copy link

Manuellama commented Jun 3, 2016

In this page:
http://v4-alpha.getbootstrap.com/components/navs/

And this section:

JavaScript behavior

Use the tab JavaScript plugin—include it individually or through the compiled bootstrap.js file—to extend our navigational tabs and pills to create tabbable panes of local content, even via dropdown menus.

When you choose a dropdown item, and open the dropdown again and choose another item, both items are selected with class .active. It causes a bug, not being able to choose either of them again.

I think I fixed it here, I commented the lines with Fix 1 and Fix 2 so you can see the two modifications.

https://www.dropbox.com/s/eg235dwr8clpny8/bootstrap.js?dl=0

@cvrebert cvrebert changed the title Found bug in JavaScript behavior (tabs component) Multiple Tabs can become .active at once Jun 3, 2016
@cvrebert
Copy link
Collaborator

cvrebert commented Jun 3, 2016

Duplicate of #17371. Feel free to submit a pull request.

@cvrebert cvrebert closed this as completed Jun 3, 2016
Manuellama added a commit to Manuellama/bootstrap that referenced this issue Jun 4, 2016
How to Fix Multiple Tabs can become .active at once twbs#20027

Original Fix here in this js:
https://www.dropbox.com/s/eg235dwr8clpny8/bootstrap.js?dl=0

I changed var into let. I do not know if this is the way to do it. Please check it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants