Added support for clicking on the dialogWrapper to close the modal