From 9dfadaefd44c559a7ee4df8f39734bc320cf267d Mon Sep 17 00:00:00 2001 From: crisbeto Date: Sat, 13 May 2017 09:34:15 +0200 Subject: [PATCH] fix(tabs): dynamic tab scrollbar showing while animating Fixes an issue that caused a scrollbar to be shown only while a tab inside a dynamic height tab group is animating. Relates to #4035. --- src/lib/tabs/tab-body.scss | 4 ++++ src/lib/tabs/tab-body.ts | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/lib/tabs/tab-body.scss b/src/lib/tabs/tab-body.scss index 135b55dd8e28..a92aaf492e20 100644 --- a/src/lib/tabs/tab-body.scss +++ b/src/lib/tabs/tab-body.scss @@ -1,4 +1,8 @@ .mat-tab-body-content { height: 100%; overflow: auto; + + .mat-tab-group-dynamic-height & { + overflow: hidden; + } } diff --git a/src/lib/tabs/tab-body.ts b/src/lib/tabs/tab-body.ts index 4a34f03ce789..77e78a2baa75 100644 --- a/src/lib/tabs/tab-body.ts +++ b/src/lib/tabs/tab-body.ts @@ -8,6 +8,7 @@ import { ElementRef, Optional, AfterViewChecked, + ViewEncapsulation, } from '@angular/core'; import { trigger, @@ -50,6 +51,7 @@ export type MdTabBodyOriginState = 'left' | 'right'; selector: 'md-tab-body, mat-tab-body', templateUrl: 'tab-body.html', styleUrls: ['tab-body.css'], + encapsulation: ViewEncapsulation.None, host: { '[class.mat-tab-body]': 'true', },