I have tried to stop the default close event with,
event.stopPropogation() and also event.preventDefault() But, it doesn’t help me to stop the process.
Could any of you know how to stop this default close event?
Is it possible to listen for browser click event?
You cannot programmatically stop the user from closing the page, for obvious reasons. The only way is to have the browser ask a confirmation question from the user (by returning the close question as a string from the event).