Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Commit

Permalink
suppress esc key only
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaanek Oja committed Sep 9, 2020
1 parent f6022c9 commit 0f30543
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/drawer/drawer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export class MdcDrawer extends MDCComponent<MDCDismissibleDrawerFoundation | MDC
(fromEvent(this._elementRef.nativeElement, 'keydown') as Observable<KeyboardEvent>)
.pipe(takeUntil(this._destroyed)).subscribe(event => this._ngZone.run(() => {
this._foundation.handleKeydown(event);
if (this.modal) {
if (this.modal && (event.key === 'Escape' || event.key === 'Esc')) {
event.stopPropagation();
event.preventDefault();
}
Expand Down

0 comments on commit 0f30543

Please sign in to comment.