Merge pull request #1288 from umap-project/clean-onbeforeunload
Remove custom message from onbeforeunload event
This commit is contained in:
commit
2986e8cec9
1 changed files with 1 additions and 7 deletions
|
@ -267,13 +267,7 @@ L.U.Map.include({
|
||||||
if (L.Util.queryString('download')) this.download()
|
if (L.Util.queryString('download')) this.download()
|
||||||
})
|
})
|
||||||
|
|
||||||
window.onbeforeunload = (e) => {
|
window.onbeforeunload = () => this.isDirty || null
|
||||||
const msg = L._('You have unsaved changes.')
|
|
||||||
if (self.isDirty) {
|
|
||||||
e.returnValue = msg
|
|
||||||
return msg
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.backup()
|
this.backup()
|
||||||
this.initContextMenu()
|
this.initContextMenu()
|
||||||
this.on('click contextmenu.show', this.closeInplaceToolbar)
|
this.on('click contextmenu.show', this.closeInplaceToolbar)
|
||||||
|
|
Loading…
Reference in a new issue