mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
🔧 Prompt User to Save Before Page Unload
This commit is contained in:
parent
dc40e7c502
commit
f4022c6cd5
|
@ -1328,6 +1328,10 @@ export default mixins(
|
||||||
|
|
||||||
document.addEventListener('keydown', this.keyDown);
|
document.addEventListener('keydown', this.keyDown);
|
||||||
document.addEventListener('keyup', this.keyUp);
|
document.addEventListener('keyup', this.keyUp);
|
||||||
|
window.onbeforeunload = this.confirmSave;
|
||||||
|
},
|
||||||
|
async confirmSave(e: Event) {
|
||||||
|
window.confirm();
|
||||||
},
|
},
|
||||||
__addConnection (connection: [IConnection, IConnection], addVisualConnection = false) {
|
__addConnection (connection: [IConnection, IConnection], addVisualConnection = false) {
|
||||||
if (addVisualConnection === true) {
|
if (addVisualConnection === true) {
|
||||||
|
|
Loading…
Reference in a new issue