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

Method _updateInert

src/material/sidenav/drawer.ts:130–145  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128 }
129
130 private _updateInert() {
131 const newValue = this._container._isShowingBackdrop();
132
133 if (newValue !== this._isInert) {
134 const element = this._element.nativeElement;
135 this._isInert = newValue;
136
137 // This can be called right before we attempt to move focus. Set the value
138 // directly, instead of waiting on change detection, because the timing is tight.
139 if (newValue) {
140 element.setAttribute('inert', 'true');
141 } else {
142 element.removeAttribute('inert');
143 }
144 }
145 }
146
147 /** Determines whether the content element should be hidden from the user. */
148 protected _shouldBeHidden(): boolean {

Callers 2

_drawerToggledMethod · 0.95
_drawerModeChangedMethod · 0.95

Calls 1

_isShowingBackdropMethod · 0.80

Tested by

no test coverage detected