fix navigate-away-prompt js utility in chrome

This commit is contained in:
Felix Hamann 2019-05-28 20:56:00 +02:00
parent c105e0c627
commit c0b07e5401

View File

@ -322,7 +322,9 @@
// cancel the unload event. This is the standard to force the prompt to appear.
event.preventDefault();
// for all non standard compliant browsers we return a truthy value to activate the prompt.
// chrome apparently does not comply to standards. We need to set the events' returnValue as well.
event.returnValue = true;
// for all other non standard compliant browsers we return a truthy value to activate the prompt.
return true;
}