Skip to content
Snippets Groups Projects
Commit abc9295b authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Minor UI fix

parent df8b460b
Branches
No related tags found
No related merge requests found
......@@ -79,9 +79,11 @@ save.addEventListener("click", (e) => {
doSave();
});
window.onbeforeunload = () => {
window.addEventListener("beforeunload", (e) => {
const state = currentState();
if (lastSaved !== null && lastSaved !== state) {
return "Your changes have not been saved. Are you sure you want to leave?"
const message = "Your changes have not been saved. Are you sure you want to leave?";
e.returnValue = message;
return message;
}
};
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment