You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Decouple backdrop click and ESC press on mat-dialog #10190
Both ESC and backdrop click closes an active dialog. This can be disabled at the moment, but only all together. These two behaviours should be decoupled.
changed the title [-]Decouple backdrop click and <kbd>ESC</kbd> press on mat-dialog[/-][+]Decouple backdrop click and ESC press on mat-dialog[/+]on Feb 28, 2018
Activity
[-]Decouple backdrop click and <kbd>ESC</kbd> press on mat-dialog[/-][+]Decouple backdrop click and ESC press on mat-dialog[/+]willshowell commentedon Feb 28, 2018
The suggested approach for this is to set
disableCloseand then usekeydownEventsorbackdropClickto re-enable the desired behavior.See #3460 and linked threads for more context.
salemdar commentedon Feb 28, 2018
@willshowell thanks for your comment. I am aware that there are possible workarounds. For example, I wrote something like this:
But wouldn't it be nice to have it out of box? I believe it could be useful for many people.
willshowell commentedon Feb 28, 2018
@salemdar the team (at least in the past) has held pretty strong to this. See #3460 (comment) for a better explanation than I can give.
jelbourn commentedon Mar 1, 2018
Yep, as per Will's comment, we don't really want to decouple these behaviors.
angular-automatic-lock-bot commentedon Sep 8, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.