From 1b19b936f1cdf922e37c6506694c1c187c1a5043 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 23 Aug 2018 16:48:42 +0200 Subject: [PATCH] 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. --- src/lib/tabs/_tabs-theme.scss | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/tabs/_tabs-theme.scss b/src/lib/tabs/_tabs-theme.scss index 7b8648a02b91..65afdc75c188 100644 --- a/src/lib/tabs/_tabs-theme.scss +++ b/src/lib/tabs/_tabs-theme.scss @@ -85,8 +85,11 @@ @mixin _mat-tab-label-focus($tab-focus-color) { .mat-tab-label, .mat-tab-link { - &.cdk-focused:not(.cdk-mouse-focused):not(.mat-tab-disabled) { - background-color: mat-color($tab-focus-color, lighter, 0.3); + &.cdk-keyboard-focused, + &.cdk-program-focused { + &:not(.mat-tab-disabled) { + background-color: mat-color($tab-focus-color, lighter, 0.3); + } } } }