Fix beforeunload not working
This commit is contained in:
parent
86341f063c
commit
03d5fab794
@ -26,9 +26,9 @@ socket.once("configuration", function(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (document.body.classList.contains("public")) {
|
if (document.body.classList.contains("public")) {
|
||||||
window.addEventListener(
|
window.addEventListener("beforeunload", (e) => {
|
||||||
"beforeunload",
|
e.preventDefault();
|
||||||
() => "Are you sure you want to navigate away from this page?"
|
e.returnValue = "Are you sure you want to navigate away from this page?";
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user