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

Method _updateFocusTrapState

src/material/sidenav/drawer.ts:636–642  ·  view source on GitHub ↗

Updates the enabled state of the focus trap.

()

Source from the content-addressed store, hash-verified

634
635 /** Updates the enabled state of the focus trap. */
636 private _updateFocusTrapState() {
637 if (this._focusTrap) {
638 // Trap focus only if the backdrop is enabled. Otherwise, allow end user to interact with the
639 // sidenav content.
640 this._focusTrap.enabled = this.opened && !!this._container?._isShowingBackdrop();
641 }
642 }
643
644 /**
645 * Updates the position of the drawer in the DOM. We need to move the element around ourselves

Callers 3

modeMethod · 0.95
ngAfterViewInitMethod · 0.95
_setOpenMethod · 0.95

Calls 1

_isShowingBackdropMethod · 0.80

Tested by

no test coverage detected