MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / onBackdropClick

Method onBackdropClick

core/src/components/menu/menu.tsx:328–339  ·  view source on GitHub ↗
(ev: any)

Source from the content-addressed store, hash-verified

326
327 @Listen('click', { capture: true })
328 onBackdropClick(ev: any) {
329 // TODO(FW-2832): type (CustomEvent triggers errors which should be sorted)
330 if (this._isOpen && this.lastOnEnd < ev.timeStamp - 100) {
331 const shouldClose = ev.composedPath ? !ev.composedPath().includes(this.menuInnerEl) : false;
332
333 if (shouldClose) {
334 ev.preventDefault();
335 ev.stopPropagation();
336 this.close(undefined, BACKDROP);
337 }
338 }
339 }
340
341 onKeydown(ev: KeyboardEvent) {
342 if (ev.key === 'Escape') {

Callers

nothing calls this directly

Calls 1

closeMethod · 0.95

Tested by

no test coverage detected