Skip to content

bug(tabs): Automatically page scrolls to top when switching between some tabs #25577

Open
@PhilFlash

Description

@PhilFlash

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

12.x

Description

Bug #9592 was fixed in Angular 12.x (with #22265).
But this bug reappears in version 14.2.0

Reproduction

Steps to reproduce:

  • scroll page a little
  • click on tab header
  • notice page scrolled to the top

Bug 9592 fixed in Material 12.x (ok => no scroll)
https://stackblitz.com/edit/components-issue-a7tfyp

Bug 9592 reappear in Material 14.2.0 (bug=> scroll to top)
https://stackblitz.com/edit/components-issue-ahv6cb

Expected Behavior

No scroll to top when switching between some tabs

Actual Behavior

scroll to top when switching between some tabs

Environment

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2The issue is important to a large percentage of users, with a workaroundarea: material/tabs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions