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

Method _closeViaBackdropClick

src/material/sidenav/drawer.ts:546–551  ·  view source on GitHub ↗

Closes the drawer with context that the backdrop was clicked.

()

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

_setOpenMethod · 0.95

Tested by

no test coverage detected