@@ -285,10 +285,15 @@ export class FocusTrap {
285285/** Factory that allows easy instantiation of focus traps. */
286286@Injectable({providedIn: 'root'})
287287export class FocusTrapFactory {
288+ private _document: Document;
289+
288290 constructor(
289291 private _checker: InteractivityChecker,
290292 private _ngZone: NgZone,
291- @Inject(DOCUMENT) private _document: Document) {}
293+ @Inject(DOCUMENT) _document: any) {
294+
295+ this._document = _document;
296+ }
292297
293298 /**
294299 * Creates a focus-trapped region around the given element.
@@ -309,6 +314,8 @@ export class FocusTrapFactory {
309314 exportAs: 'cdkTrapFocus',
310315})
311316export class CdkTrapFocus implements OnDestroy, AfterContentInit {
317+ private _document: Document;
318+
312319 /** Underlying FocusTrap instance. */
313320 focusTrap: FocusTrap;
314321
@@ -332,7 +339,7 @@ export class CdkTrapFocus implements OnDestroy, AfterContentInit {
332339 constructor(
333340 private _elementRef: ElementRef,
334341 private _focusTrapFactory: FocusTrapFactory,
335- @Inject(DOCUMENT) private _document: Document ) {
342+ @Inject(DOCUMENT) _document: any ) {
336343
337344 this._document = _document;
338345 this.focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement, true);
0 commit comments