File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,15 @@ 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 . hasAttribute ( 'align' ) )
235+ . toBe ( false , 'Expected sidenav not to have a native align attribute.' ) ;
236+ } ) ;
237+
229238 } ) ;
230239
231240} ) ;
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ export class MdDuplicatedSidenavError extends MdError {
3838 template : '<ng-content></ng-content>' ,
3939 host : {
4040 '(transitionend)' : '_onTransitionEnd($event)' ,
41+ // must prevent the browser from aligning text based on value
42+ '[attr.align]' : 'null'
4143 } ,
4244 changeDetection : ChangeDetectionStrategy . OnPush ,
4345 encapsulation : ViewEncapsulation . None ,
You can’t perform that action at this time.
0 commit comments