diff --git a/suit/static/suit/js/suit-form-confirm.js b/suit/static/suit/js/suit-form-confirm.js index 0914c4a0..98db8d11 100644 --- a/suit/static/suit/js/suit-form-confirm.js +++ b/suit/static/suit/js/suit-form-confirm.js @@ -49,10 +49,10 @@ var confirmExitIfModified = (function () { return function (form_id, message) { var form = document.forms[form_id] if (form) { - form.onsubmit = function (e) { + form.addEventListener('submit', function (e) { e = e || window.event; submit = true - }; + }); } window.onbeforeunload = function (e) { e = e || window.event;