components icon indicating copy to clipboard operation
components copied to clipboard

[mat-tab-group] matTabContent gets duplicated when switching tabs

Open hneuer opened this issue 7 years ago • 4 comments

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Each tab's content should be displayed just once

What is the current behavior?

Some tab's content gets duplicated when the tabs are switched frequently.

What are the steps to reproduce?

  • open this StackBlitz: https://stackblitz.com/edit/angular-q2pkcy?file=app/tab-group-lazy-loaded-example.html
  • switch fast (i.e. before the animation ends) between the three tabs (in the order Third, First, Second). At some point the content of one of the tabs will be duplicated:

image

Note: I could reproduce this only with a div element right under the ng-template. It was not reproducible with just the text in there as it is in the original StackBlitz

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

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

Material 7.2.1 Chrome (maybe others)

hneuer avatar Jan 08 '19 14:01 hneuer

Yes, it only seems to happen when the content is lazily loaded.

Ploppy3 avatar Jan 08 '19 15:01 Ploppy3

Possible duplicate of https://github.com/angular/material2/issues/10938 Possibly related to angular/angular#26133

manklu avatar Jan 08 '19 17:01 manklu

Thanks for reporting the issue, will close as a duplicate of #10938

andrewseguin avatar Jan 09 '19 23:01 andrewseguin

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.