clicking on overlay closes dialog