JQuery UI Dialog Close On Click Outside Of The Box
This plugin closes a dialogbox when clicked outside of the box. This option is not available in jQuery UI. No need to intailize or add a method, just load the file and it should work for all the dialogs available.
Simply Load jquery.dialog.widgets.custom.js after the jQuery UI file and enjoy. This should auto add the click event handler to document when dialog.open is called and removes it on close function.