Skip to content

MatPaginatedTabHeader doesn't scroll last tab fully into view #17853

@rvv-bouvet

Description

@rvv-bouvet

Reproduction

Use StackBlitz to reproduce your issue: https://stackblitz.com/edit/components-issue-wsbxpk

Steps to reproduce:

  1. Set selectedIndex to last tab
  2. Render

Expected Behavior

image

Selected tab is scrolled fully into view and righthand pagination button disabled just as if the user manually clicked on the last tab

Actual Behavior

image

Tab is only partially visible and pagination button remains enabled. When tab titles vary in size only a few pixels of the last tab are visible. Clicking on the last tab manually scrolls it fully into view.

Environment

  • Angular: 8.2.14
  • CDK/Material: 8.2.3
  • Browser(s): Chrome, Firefox, Internet Explorer 11, Safari
  • Operating System (e.g. Windows, macOS, Ubuntu): All

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/tabs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions