diff --git a/frontend/src/utils/form/navigate-away-prompt.js b/frontend/src/utils/form/navigate-away-prompt.js index bb05238aa..da900ba72 100644 --- a/frontend/src/utils/form/navigate-away-prompt.js +++ b/frontend/src/utils/form/navigate-away-prompt.js @@ -107,13 +107,8 @@ export class NavigateAwayPrompt { // allow the event to happen if the form was not touched by the // user (i.e. if the current FormData is equal to the initial FormData) // or the unload event was initiated by a form submit - if (!formDataHasChanged) + if (!formDataHasChanged || this.unloadDueToSubmit) return; - - - if(this._unloadDueToSubmit) { - return; - } // cancel the unload event. This is the standard to force the prompt to appear. event.preventDefault();