Skip to content

bug(mat-tab-group): preserveContent not working  #24432

@stiles-j

Description

@stiles-j

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

[preserveContent] does not work. Even in the Angular Material online documentation the [preserveContent] input is not working as expected.

Reproduction

Steps to reproduce:

  1. Create a mat-tab-group with at least two tabs where one of the tabs content contains an iframe
  2. Change tabs, the content in the iframe will not continue to play, or will the content stay loaded in the DOM

Expected Behavior

The content in the hidden tab containing the iframe should continue to play and continue to exist in the DOM

Actual Behavior

The content in the iframe stops playing and is removed from the DOM

Environment

  • Angular: 13.1.3
  • CDK/Material: 13.2.2
  • Browser(s): Chrome, Edge
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions