Repair the close event of the modal.