@@ -285,10 +285,15 @@ export class FocusTrap {
285
285
/** Factory that allows easy instantiation of focus traps. */
286
286
@Injectable ( { providedIn : 'root' } )
287
287
export class FocusTrapFactory {
288
+ private _document : Document ;
289
+
288
290
constructor (
289
291
private _checker : InteractivityChecker ,
290
292
private _ngZone : NgZone ,
291
- @Inject ( DOCUMENT ) private _document : Document ) { }
293
+ @Inject ( DOCUMENT ) _document : any ) {
294
+
295
+ this . _document = _document ;
296
+ }
292
297
293
298
/**
294
299
* Creates a focus-trapped region around the given element.
@@ -309,6 +314,8 @@ export class FocusTrapFactory {
309
314
exportAs : 'cdkTrapFocus' ,
310
315
} )
311
316
export class CdkTrapFocus implements OnDestroy , AfterContentInit {
317
+ private _document : Document ;
318
+
312
319
/** Underlying FocusTrap instance. */
313
320
focusTrap : FocusTrap ;
314
321
@@ -332,7 +339,7 @@ export class CdkTrapFocus implements OnDestroy, AfterContentInit {
332
339
constructor (
333
340
private _elementRef : ElementRef ,
334
341
private _focusTrapFactory : FocusTrapFactory ,
335
- @Inject ( DOCUMENT ) private _document : Document ) {
342
+ @Inject ( DOCUMENT ) _document : any ) {
336
343
337
344
this . _document = _document ;
338
345
this . focusTrap = this . _focusTrapFactory . create ( this . _elementRef . nativeElement , true ) ;
0 commit comments