Skip to content

Commit

Permalink
Fixed issue #18298: Saving in question organizer always prompts (#2559)
Browse files Browse the repository at this point in the history
Co-authored-by: encuestabizdevgit <devgit@encuesta.biz>
  • Loading branch information
gabrieljenik and encuestabizdevgit committed Aug 2, 2022
1 parent 0d1f8bd commit d52ec83
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions assets/scripts/admin/organize.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ $(document).on('ready pjax:scriptcomplete', function(){
/**
* Show confirmation message when user leaves without saving
*/
window.onload = function() {
// Don't show the confirmation prompt for now. It doesn't work when "leaving" through PJAX,
// and it interferes with save.
/*window.onload = function() {
window.addEventListener("beforeunload", function (e) {
if (formSubmitting) {
return undefined;
Expand All @@ -86,7 +88,7 @@ window.onload = function() {
return confirmationMessage; //Gecko + Webkit, Safari, Chrome etc.
}
});
}
}*/

/**
* Fix big question part
Expand Down

0 comments on commit d52ec83

Please sign in to comment.