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

Method _containsFocus

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

Checks whether the stepper contains the focused element.

()

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

Tested by

no test coverage detected