Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #5362
Closed
Open
Issue created Oct 01, 2012 by Administrator@rootContributor

Tab events fired on wrong dropdown anchor

Created by: Sinetheta

When .tabs() are used with a dropdown option the show and shown events will always reference the last option instead of the correct option. jsFiddle

The problem is line 52 of bootstrap-tab.js

previous = $ul.find('.active a').last()[0]

Since both the parent and child <li> are given a class of .active, this selector will scoop up all of the anchors in the parent, then grab only the last one. It could instead filter before traversing to the anchor.

previous = $ul.find('.active:last a')[0]
Assignee
Assign to
Time tracking