Skip to content

Decouple backdrop click and ESC press on mat-dialog #10190

Closed
@salemdar

Description

@salemdar

Feature request:

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.

What is the expected behavior?

MatDialogConfig should have 2 extra properties:

// ...
disableCloseOnEscape: boolean,
disableCloseOnBackdropClick: boolean

What is the use-case or motivation for changing an existing behavior?

So we can disable closing on backdrop click, but keep close on ESC press. It would be very helpful for inaccurate mouse users :).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions