Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to have a confirmation modal only when the ngDialog is closed by clicking on the overlay or pressing ESC? #565

Open
Riccardo-Andreatta opened this issue Aug 10, 2017 · 0 comments

Comments

@Riccardo-Andreatta
Copy link

Hi, I am using ngDialog version 1.3.0 with AngularJS 1.6.4.

I know about the options that are preventing the closure of the dialog by clicking the overlay or the ESC key

closeByDocument: false,
closeByEscape: false,

but what I am trying to do is a modal that alert the user if they are trying to close the dialog when they have already typed something in the form that is inside the first dialog.

This example may explains better what I would like to do:
https://plnkr.co/edit/SzmNd0hqoTEoxZX7HPIS?p=preview

Basically, I would like that if the user click elsewhere or try to close the modal the alert is shown (like the example is doing), but if he tries to submit the form, the alert should not be shown.

Is it possible to do it? Is there already a functionality that is doing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant