Returns whether focus is inside the dialog.
()
| 350 | |
| 351 | /** Returns whether focus is inside the dialog. */ |
| 352 | private _containsFocus() { |
| 353 | const element = this._elementRef.nativeElement; |
| 354 | const activeElement = _getFocusedElementPierceShadowDom(); |
| 355 | return element === activeElement || element.contains(activeElement); |
| 356 | } |
| 357 | |
| 358 | /** Sets up the focus trap. */ |
| 359 | private _initializeFocusTrap() { |
no test coverage detected