Material: mdDialog: escapeToClose: false; Still closes when escape button pressed

Created on 19 Feb 2016  路  6Comments  路  Source: angular/material

In case an mdDialog is shown, with
escapeToClose: true
and is then dismissed, any following next mdDialog with
escapeToClose: false
can still be closed when pressing the escape button.

Seems like key handler is not being unset.

Expected behaviour is given only in case the very first mdDialog since pageload is opened with escapeToClose: false.

merge ready fixed

Most helpful comment

Got it fixed in #7222.

All 6 comments

Yes can reproduce, here's a little demo which shows that issue. http://codepen.io/DevVersion/pen/JGqBKG?editors=1011

@DevVersion Perfect example, that's exactly what I mean.

Possible duplicate of issue #5153,

However, that one may have gone unnoticed.

Got it fixed in #7222.

dialog seems to fail to close when

this.dialogRef.close();

is called. Should I file a new ticket? I _can tell it won't be closable_ because the buttons turn a different shade if it's closable vs. not closable.

@ORESoftware it looks like you might be referring to Angular Material instead of AngularJS Material (this repo). Please submit Angular Material questions here and issues here.

Was this page helpful?
0 / 5 - 0 ratings