Skip to content

bug(tab): position sticky is broken inside of tabs #28500

@saithis

Description

@saithis

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

position sticky doesn't work inside of mat-tabs because they use overflow: hidden;

Reproduction

StackBlitz link: https://components-issue-kwznw3.stackblitz.io https://stackblitz.com/edit/components-issue-kwznw3?file=src%2Fapp%2Fexample-component.html
Steps to reproduce:

  1. scroll down
  2. see that the "broken scroll" element inside of the tab doesn't stick, but the same code outside does (see "sticky" right below it)

Expected Behavior

position sticky should work

Actual Behavior

position sticky doesn't work

Environment

  • Angular: tried it with 16.2.1 and 17.1.0
  • CDK/Material: tried it with 16.2.1 and 17.1.0
  • Browser(s): chrome/firefox
  • Operating System (e.g. Windows, macOS, Ubuntu): windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/tabs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions