Skip to content
Snippets Groups Projects
Commit 6c9e9e01 authored by mattwire's avatar mattwire
Browse files

civicrmStripeConfirm.js: Run when DOMContentLoaded event is triggered

parent 2e69f830
No related branches found
No related tags found
1 merge request!1246.5
...@@ -171,10 +171,11 @@ ...@@ -171,10 +171,11 @@
return; return;
} }
confirm.checkAndLoad(); document.addEventListener('DOMContentLoaded', function() {
confirm.handleCardConfirm(); CRM.payment.debugging(confirm.scriptName, 'DOMContentLoaded');
// Disable the browser "Leave Page Alert" which is triggered because we mess with the form submit function. confirm.checkAndLoad();
window.onbeforeunload = null; confirm.handleCardConfirm();
});
}(CRM.$, CRM.ts('com.drastikbydesign.stripe'))); }(CRM.$, CRM.ts('com.drastikbydesign.stripe')));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment