File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,14 @@ describe('MdSidenav', () => {
226226 expect ( sidenavEl . classList ) . toContain ( 'md-sidenav-opened' ) ;
227227 } ) ;
228228
229+ it ( 'should remove align attr from DOM' , ( ) => {
230+ const fixture = TestBed . createComponent ( BasicTestApp ) ;
231+ fixture . detectChanges ( ) ;
232+
233+ const sidenavEl = fixture . debugElement . query ( By . css ( 'md-sidenav' ) ) . nativeElement ;
234+ expect ( sidenavEl . getAttribute ( 'align' ) ) . toBe ( null ) ;
235+ } ) ;
236+
229237 } ) ;
230238
231239} ) ;
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ export class MdDuplicatedSidenavError extends MdError {
3838 template : '<ng-content></ng-content>' ,
3939 host : {
4040 '(transitionend)' : '_onTransitionEnd($event)' ,
41+ '[attr.align]' : 'null' // must prevent the browser from aligning text based on value
4142 } ,
4243 changeDetection : ChangeDetectionStrategy . OnPush ,
4344 encapsulation : ViewEncapsulation . None ,
You can’t perform that action at this time.
0 commit comments