Skip to content

Commit d3af441

Browse files
crisbetojelbourn
authored andcommitted
fix(tabs): disable focus overlay for touch focus (#12249)
Doesn't show the tab's focus indication if it was focused by anything, other than keyboard or programmatically. Fixes #12247.
1 parent a6b8a06 commit d3af441

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/lib/tabs/_tabs-theme.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,11 @@
8585
@mixin _mat-tab-label-focus($tab-focus-color) {
8686
.mat-tab-label,
8787
.mat-tab-link {
88-
&.cdk-focused:not(.cdk-mouse-focused):not(.mat-tab-disabled) {
89-
background-color: mat-color($tab-focus-color, lighter, 0.3);
88+
&.cdk-keyboard-focused,
89+
&.cdk-program-focused {
90+
&:not(.mat-tab-disabled) {
91+
background-color: mat-color($tab-focus-color, lighter, 0.3);
92+
}
9093
}
9194
}
9295
}

0 commit comments

Comments
 (0)