add event.preventDefault to undelete function