File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 88
99import { CommonModule } from '@angular/common' ;
1010import { NgModule } from '@angular/core' ;
11+ import { ObserversModule } from '@angular/cdk/observers' ;
1112import { MatError } from './error' ;
1213import { MatFormField } from './form-field' ;
1314import { MatHint } from './hint' ;
@@ -27,7 +28,10 @@ import {MatSuffix} from './suffix';
2728 MatPrefix ,
2829 MatSuffix ,
2930 ] ,
30- imports : [ CommonModule ] ,
31+ imports : [
32+ CommonModule ,
33+ ObserversModule ,
34+ ] ,
3135 exports : [
3236 MatError ,
3337 MatFormField ,
Original file line number Diff line number Diff line change 2727 <!-- We add aria-owns as a workaround for an issue in JAWS & NVDA where the label isn't
2828 read if it comes before the control in the DOM. -->
2929 < label class ="mat-form-field-label "
30+ (cdkObserveContent) ="updateOutlineGap() "
3031 [id] ="_labelId "
3132 [attr.for] ="_control.id "
3233 [attr.aria-owns] ="_control.id "
Original file line number Diff line number Diff line change @@ -481,7 +481,12 @@ export class MatFormField extends _MatFormFieldMixinBase
481481 this . _outlineGapWidth = 0 ;
482482 }
483483 this . _initialGapCalculated = true ;
484- this . _changeDetectorRef . markForCheck ( ) ;
484+ // @breaking -change 7.0.0 Remove this check and else block once _ngZone is required.
485+ if ( this . _ngZone ) {
486+ this . _ngZone . run ( ( ) => this . _changeDetectorRef . markForCheck ( ) ) ;
487+ } else {
488+ this . _changeDetectorRef . markForCheck ( ) ;
489+ }
485490 }
486491
487492 /** Gets the start end of the rect considering the current directionality. */
You can’t perform that action at this time.
0 commit comments