Skip to content

Make active tab behaviour independent of html structure #20156

Description

@alberto

In v4, the active tab selector is defined as:

ACTIVE_CHILD: '> .nav-item > .active, > .active',

The first selector forces us to use the nav-item class for the tab, which I would like to avoid in my case.

The second selector, which applies to the tab, not the link, doesn't seem to work correctly (see #18566)

Is the descendant selector really needed?

Activity

  1. added
    jsJavaScript or TypeScript sources and plugins
    v4v4, the frozen docs on gh-pages
    on Jun 22, 2016
  2. added
    help-wantedMaintainers would welcome a contribution
    on Nov 27, 2016
  3. added this to the v4.0.0-alpha.6 milestone on Nov 27, 2016
  4. srvance commented on Jan 25, 2017

    @srvance

    I'm running into problems with this, as well, but perhaps in the opposite direction. In most cases, putting active on the item with nav-item works, but in some cases like tabs, it needs to be on the nav-link. On the surface, it appears inconsistent, but I may not be seeing the pattern. Understanding this is important for ember-bootstrap, where we're re-implementing the JS behaviors in an Ember-y way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help-wantedMaintainers would welcome a contributionjsJavaScript or TypeScript sources and pluginsv4v4, the frozen docs on gh-pages

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions