I use BlockUI on every page unload/load
$(window).on('beforeunload', function() {
$.blockUI();
});
$(window).on('unload', function() {
$.unblockUI();
});
and Form Savior to prompt the user when leaving a page with unsaved form data
$(document).ready(function() {
$("form").formSavior();
});
If the user opts to "Stay on Page" (as Firefox puts it), the UI remains blocked, and I can't see how to configure either plugin to avoid this (reordering the above statements doesn't help :-/)
I am willing to hack or adapt the (concise) Form Savior code, but can't see how to hook an unblockUI() to a cancellation.
NB my 1st question (or is that obvious?!)