Ensures the modal can be closed by clicking on the modal background