Remove custom message from onbeforeunload event

It's not supported anymore by browsers.
This commit is contained in:
Yohan Boniface 2023-08-29 16:36:04 +02:00
parent 597b3bb10f
commit ed7181ba24

View file

@ -267,13 +267,7 @@ L.U.Map.include({
if (L.Util.queryString('download')) this.download()
})
window.onbeforeunload = (e) => {
const msg = L._('You have unsaved changes.')
if (self.isDirty) {
e.returnValue = msg
return msg
}
}
window.onbeforeunload = () => this.isDirty || null
this.backup()
this.initContextMenu()
this.on('click contextmenu.show', this.closeInplaceToolbar)