confirm reload in admin view

This commit is contained in:
Jörn-Michael Miehe 2023-10-28 23:51:57 +02:00
parent 3d62486783
commit bf6d72147e

View file

@ -18,5 +18,16 @@ import DoorMapEditor from "./DoorMapEditor.vue";
DoorMapEditor,
},
})
export default class extends Vue {}
export default class extends Vue {
private old_handler = window.onbeforeunload;
private confirm_handler = () => "";
public mounted(): void {
window.onbeforeunload = this.confirm_handler;
}
public beforeUnmount(): void {
window.onbeforeunload = this.old_handler;
}
}
</script>