Closed cretace closed 7 years ago
Hi @cretace,
You can cancel the closing the modal window in plainmodalbeforeclose evnet.
Ok, but can I detect if the click is on the overlay and not the modal ?
It's ok I figured it out - set a value on clicks Thanks
Yes, you can hook a click
event of the overlay and cancel it, but it's not smart because your code should do something when the button is clicked.
e.g.: When the "Save" button is clicked, your code checks "File Name", and set true
to isOk
.
I have validation on the form fields so it's all covered - plus a 'cancel' button to dismiss the modal. It was a mistake to put this form in a modal - but I'm not the designer!
So, at least this issue seems to have been solved, and I close it.
Is it possible to stop clicks outside the modal closing it ? I would like to only allow clicks on my save / cancel buttons to dismiss the modal