-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/tabs
Description
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
This is an issue since at least version 16 and its also present in 17+. I guess it has been there for a long time..
When using "mat-tab-nav-bar" and when hitting SPACE to select a tab, the page will scroll. When using ENTER it works fine.
I guess we should also preventDefault when hitting SPACE?
Reproduction
- https://material.angular.io/components/tabs/overview#tabs-and-navigation
- Click "view full example"
- Focus one of the tabs and select a tab with arrow keys
- Hit SPACE to activate a tab
Expected Behavior
- Page will not scroll down
Actual Behavior
- Page is scrolling down
Environment
- Angular: 17.0.8
- CDK/Material: 17.0.4
- Browser(s): Chrome 119.0.6045.160
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/tabs
