DAR-2604: triggering modal close action when clicking on the close button or the blackout
DAR-2604: fixing modal's destroyOnClose implementation