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
  • #27006
Closed
Open
Issue created Jul 31, 2018 by Administrator@rootContributor

tabs.js _activate is too restrictive

Created by: mnlipp

I have a slightly more complicated tab layout than usual. The tab has an additional icon.

<li class="nav-item text-nowrap" data-portlet-tab="portlet-tab-2">
  <span class="nav-link">
    <a id="portlet-tab-2-tab" data-toggle="tab" href="#portlet-tab-2-pane" role="tab" class="active show" aria-selected="true">Hello World</a>
    <a href="#" class="fa fa-times ml-1 portlet-tab-close"></a>
  </span>
</li>

This would work if the active class was properly removed from the tab. But the selector for active is too restrictive.

        if (container.nodeName === 'UL') {
          activeElements = $$$1(container).find(Selector.ACTIVE_UL);
        } else {
          activeElements = $$$1(container).children(Selector.ACTIVE);
        }

The element with the active class (the one with the data-toggle) must be an immediate child of the UL, but in my case, it isn't. I don't think that this very restrictive rule is necessary, the active element can also be a grand-child (as in my case) or even further down in the hierarchy without causing problems.

Assignee
Assign to
Time tracking