diff --git a/public/red/ui/deploy.js b/public/red/ui/deploy.js index c76b31e8a..b18dfb7ee 100644 --- a/public/red/ui/deploy.js +++ b/public/red/ui/deploy.js @@ -72,12 +72,15 @@ RED.deploy = (function() { RED.nodes.on('change',function(state) { if (state.dirty) { + window.onbeforeunload = function() { + return "You have undeploy changes.\n\nLeaving this page will lose these changes."; + } $("#btn-deploy").removeClass("disabled"); } else { + window.onbeforeunload = null; $("#btn-deploy").addClass("disabled"); } }); - } function save(force) {