MCPcopy Create free account
hub / github.com/angular/components / _containsFocus

Method _containsFocus

src/cdk/stepper/stepper.ts:610–614  ·  view source on GitHub ↗

Checks whether the stepper contains the focused element.

()

Source from the content-addressed store, hash-verified

608
609 /** Checks whether the stepper contains the focused element. */
610 private _containsFocus(): boolean {
611 const stepperElement = this._elementRef.nativeElement;
612 const focusedElement = _getFocusedElementPierceShadowDom();
613 return stepperElement === focusedElement || stepperElement.contains(focusedElement);
614 }
615
616 /** Checks whether the passed-in index is a valid step index. */
617 private _isValidIndex(index: number): boolean {

Callers 1

Calls 1

Tested by

no test coverage detected