Prevent the default action on the modal's buttons.