File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ describe('FocusTrap', () => {
103
103
104
104
expect ( anchors . every ( current => current . getAttribute ( 'tabindex' ) === '0' ) ) . toBe ( true ) ;
105
105
106
- fixture . componentInstance . isFocusTrapEnabled = false ;
106
+ fixture . componentInstance . _isFocusTrapEnabled = false ;
107
107
fixture . detectChanges ( ) ;
108
108
109
109
expect ( anchors . every ( current => current . getAttribute ( 'tabindex' ) === '-1' ) ) . toBe ( true ) ;
@@ -172,7 +172,7 @@ class SimpleFocusTrap {
172
172
173
173
@Component ( {
174
174
template : `
175
- <div *ngIf="renderFocusTrap" [cdkTrapFocus]="isFocusTrapEnabled ">
175
+ <div *ngIf="renderFocusTrap" [cdkTrapFocus]="_isFocusTrapEnabled ">
176
176
<input>
177
177
<button>SAVE</button>
178
178
</div>
@@ -181,7 +181,7 @@ class SimpleFocusTrap {
181
181
class FocusTrapWithBindings {
182
182
@ViewChild ( FocusTrapDirective ) focusTrapDirective : FocusTrapDirective ;
183
183
renderFocusTrap = true ;
184
- isFocusTrapEnabled = true ;
184
+ _isFocusTrapEnabled = true ;
185
185
}
186
186
187
187
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ export class MatDrawer implements AfterContentInit, OnDestroy {
211
211
*/
212
212
_modeChanged = new Subject ( ) ;
213
213
214
- get isFocusTrapEnabled ( ) {
214
+ get _isFocusTrapEnabled ( ) {
215
215
// The focus trap is only enabled when the drawer is open in any mode other than side.
216
216
return this . opened && this . mode !== 'side' ;
217
217
}
@@ -224,7 +224,7 @@ export class MatDrawer implements AfterContentInit, OnDestroy {
224
224
this . _elementFocusedBeforeDrawerWasOpened = this . _doc . activeElement as HTMLElement ;
225
225
}
226
226
227
- if ( this . isFocusTrapEnabled && this . _focusTrap ) {
227
+ if ( this . _isFocusTrapEnabled && this . _focusTrap ) {
228
228
this . _focusTrap . focusInitialElementWhenReady ( ) ;
229
229
}
230
230
} ) ;
@@ -251,7 +251,7 @@ export class MatDrawer implements AfterContentInit, OnDestroy {
251
251
252
252
ngAfterContentInit ( ) {
253
253
this . _focusTrap = this . _focusTrapFactory . create ( this . _elementRef . nativeElement ) ;
254
- this . _focusTrap . enabled = this . isFocusTrapEnabled ;
254
+ this . _focusTrap . enabled = this . _isFocusTrapEnabled ;
255
255
this . _enableAnimations = true ;
256
256
}
257
257
@@ -301,7 +301,7 @@ export class MatDrawer implements AfterContentInit, OnDestroy {
301
301
} ) ;
302
302
303
303
if ( this . _focusTrap ) {
304
- this . _focusTrap . enabled = this . isFocusTrapEnabled ;
304
+ this . _focusTrap . enabled = this . _isFocusTrapEnabled ;
305
305
}
306
306
}
307
307
You can’t perform that action at this time.
0 commit comments