Skip to content

md-tab-group does not initialize properly in a container with display: none #7006

Closed

Description

@drakenfly

Bug, feature request, or proposal:

When creating a tab-group inside a container element, that has it's display-property set to none, the selected tab does not seem to be selected once the element is revealed.

What is the expected behavior?

When I switch the container's display-property from none to block, the first tab (or the one defined via [selectedIndex] should have it's floating ink bar indicating, that the tab is selected.

What is the current behavior?

The first tab does not seem to be selected (even though it's content is shown, but the animations are broken on the first tab change (dynamicHeight)) when creating the tab-group in a container that has display: none; set.

What are the steps to reproduce?

See this plunker: http://plnkr.co/edit/tE1Jmfl3xnSOhu2AahHt?p=preview

What is the use-case or motivation for changing an existing behavior?

In some accordion components it is quite common to just

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

"@angular/animations": "^4.3.6",
"@angular/cdk": "^2.0.0-beta.10",
"@angular/common": "^4.2.4",
"@angular/compiler": "^4.2.4",
"@angular/core": "^4.2.4",
"@angular/forms": "^4.2.4",
"@angular/http": "^4.2.4",
"@angular/material": "^2.0.0-beta.10",
"@angular/platform-browser": "^4.2.4",
"@angular/platform-browser-dynamic": "^4.2.4",
"@angular/router": "^4.2.4"

Is there anything else we should know?

Activity

  1. josephperrott commented on Sep 26, 2017

    @josephperrott
    Member

    Duplicate of #7274

  2. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  3. locked and limited conversation to collaborators on Sep 7, 2019
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions