I have a confirm box on beforeload event - the code is as follows:
window.onbeforeunload = function(){
//alert('leaving ... ' + is_edited );
if (is_edited == true) {
return confirm('Are you sure you want to navigate away from this page? \n\n Press OK to continue, or Cancel to stay on the current page.');
}
};
The problem is that - the confirm alert is showing twice. I have searched on stackoverflow and got many questions about this issue. But mine is somewhat different. It is not the same confirm alert showing twice. For FF the message is same but for Crome in second confirm box the message is false
.
Thanks in advance.