feat: confirm before closing the browser tab (#723)

when the editor is open and file is changed
This commit is contained in:
Stefan Dej authored and GitHub committed 2022-03-20 01:45:06 +01:00
1 parent 8a00b373d5
commit 1a68218267
3 files changed
+36 -8

No files matched your search

+5
View File
@@ -263,3 +263,8 @@ export function getMacroParams(macro: { gcode: string }): PrinterStateMacroParam
return ret
}
export function windowBeforeUnloadFunction(e: BeforeUnloadEvent) {
e.preventDefault()
e.returnValue = ''
}