Skip to content

Allow changing of disableClose property for dialog while dialog is open #3938

Closed
@harrymitchinson

Description

@harrymitchinson

Bug, feature request, or proposal:

Feature request

What is the expected behavior?

If a dialog is opened with disableClose as false, being able to change disableClose to true from within the dialog's component making it so dialog cannot be closed by clicking outside of the dialog area.

What is the current behavior?

Updating disableClose does not do anything. If the dialog is opened with disableClose as false and then disableClose is set to true, you can click outside the dialog and the dialog will close.

What are the steps to reproduce?

Change this.dialogRef.config.disableClose = true; from within a dialog component
Example

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

Using dialog for registration form. After registration submit the form changes to a confirmation code input which the user should not be able to navigate away from without registering again.

Which versions of Angular, Material, OS, browsers are affected?

"@angular/common": "^4.0.0",
"@angular/cli": "1.0.0",
"@angular/material": "^2.0.0-beta.2"

All OS & only tested Chrome but would assume all browsers

Is there anything else we should know?

No :)

Metadata

Metadata

Assignees

Labels

P5The team acknowledges the request but does not plan to address it, it remains open for discussionfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions