diff --git a/ui/src/components/admin/AdminView.vue b/ui/src/components/admin/AdminView.vue index 5c771c9..f417c08 100644 --- a/ui/src/components/admin/AdminView.vue +++ b/ui/src/components/admin/AdminView.vue @@ -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; + } +}