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

Method _closeViaBackdropClick

src/material/sidenav/drawer.ts:538–543  ·  view source on GitHub ↗

Closes the drawer with context that the backdrop was clicked.

()

Source from the content-addressed store, hash-verified

536
537 /** Closes the drawer with context that the backdrop was clicked. */
538 _closeViaBackdropClick(): Promise<MatDrawerToggleResult> {
539 // If the drawer is closed upon a backdrop click, we always want to restore focus. We
540 // don't need to check whether focus is currently in the drawer, as clicking on the
541 // backdrop causes blurs the active element.
542 return this._setOpen(/* isOpen */ false, /* restoreFocus */ true, 'mouse');
543 }
544
545 /**
546 * Toggle this drawer.

Callers 1

Calls 1

_setOpenMethod · 0.95

Tested by

no test coverage detected