Is there a way to stop a close event for a jQuery UI Dialog?
I have a dialog modal with a form. When the user closes the dialog, I’d like to prompt “Continue without saving changes?” [Yes] [No]. The [Yes] button continues and closes the dialog as expected. The [No] button will stop the close event and keep the dialog open.
Is this possible?
Yes, you can use the
beforeCloseoption. From the docs: