Skip to content

bug(MatTab): matieral tab header: pagination controls flickering #27443

@alexfung888

Description

@alexfung888

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

15

Description

At some particular widths, the tab header will jump between two states:

  • display the tab headers with pagination control (ie < on far left and > on far right)
  • display the tab headers without pagination controls

I cannot make a sample code to show this, but it has already appeared on two of my pages. When it happens, the page width is wide enough to show all the tab headers without scrolling. Yet, the <> appears (making the headers to be displayed with less spacing) and then disappears. It is happening at more times per second than my eye can catch. All I can see is a pair of blur images for each tab header, since they are placed at slightly different locations with vs without the <>. On inspection, the class mat-mdc-tab-header-pagination-controls-enabled will be applied and removed from the mat-tab-header at top speed.

This is the same as the locked issue 27084

@amysorto

Reproduction

I have no idea how to reproduce it, it happens when the material tab group has a particular range of width.

Even given a page with a material tab group, it is not always possible to resize the page to make this happen.

Refer to the photo I took

Expected Behavior

the tab headers should either be displayed with or without the scrolling controls < and >

Actual Behavior

the display is swapping between the two, making the headers unreadable.

Environment

  • Angular: 16.1.4
  • CDK/Material: 16.1.4
  • Browser(s): Chrome Version 114.0.5735.199 (Official Build) (64-bit)
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 10 21H2

Metadata

Metadata

Assignees

Labels

needs triageThis issue needs to be triaged by the teamneeds: clarificationThe issue does not contain enough information for the team to determine if it is a real bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions