I ended up removing the part of the script related to Sweet Alert (SWAL) JS and it works. It’s jus not as pretty.
Based on this discussion: Action Button Confirmation
Change line 5. Instead of:
var r = swal(confirmationText, {buttons: ["No way!", "Yes, proceed"],});
Change it to: :
var r = confirm(confirmationText);