Skip to content

Commit

Permalink
fix(tabs): dynamic tab scrollbar showing while animating
Browse files Browse the repository at this point in the history
Fixes an issue that caused a scrollbar to be shown only while a tab inside a dynamic height tab group is animating.

Relates to angular#4035.
  • Loading branch information
crisbeto committed May 13, 2017
1 parent 6121fa1 commit 9dfadae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/tabs/tab-body.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.mat-tab-body-content {
height: 100%;
overflow: auto;

.mat-tab-group-dynamic-height & {
overflow: hidden;
}
}
2 changes: 2 additions & 0 deletions src/lib/tabs/tab-body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
ElementRef,
Optional,
AfterViewChecked,
ViewEncapsulation,
} from '@angular/core';
import {
trigger,
Expand Down Expand Up @@ -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',
},
Expand Down

0 comments on commit 9dfadae

Please sign in to comment.