diff --git a/static/js/utils/form.js b/static/js/utils/form.js index 3cbbbd852..ed8b0fa9a 100644 --- a/static/js/utils/form.js +++ b/static/js/utils/form.js @@ -308,6 +308,8 @@ } function beforeUnloadHandler(event) { + // allow the event to happen if the form was not touched by the + // user or the unload event was initiated by a form submit if (!touched || unloadDueToSubmit) { return false; }