Close modal when pressing outside the modal content