CMS-4731 Modal Window - Cancel by clicking outside

Added outside click listener to the `ModalDialog`.