This commit is contained in:
oobabooga 2024-10-01 10:22:57 -07:00
parent cca9d6e22d
commit d364aa0a3c

View File

@ -604,11 +604,11 @@ headerBar.addEventListener("click", (e) => {
// Add a confirmation dialog when leaving the page // Add a confirmation dialog when leaving the page
// Useful to avoid data loss // Useful to avoid data loss
//------------------------------------------------ //------------------------------------------------
window.addEventListener('beforeunload', function (event) { window.addEventListener("beforeunload", function (event) {
// Cancel the event // Cancel the event
event.preventDefault(); event.preventDefault();
// Chrome requires returnValue to be set // Chrome requires returnValue to be set
event.returnValue = ''; event.returnValue = "";
}); });
moveToChatTab(); moveToChatTab();