]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Add missing event argument and curly bracket
authorSamuel Mannehed <samuel@cendio.se>
Thu, 25 Aug 2016 14:49:02 +0000 (16:49 +0200)
committerSamuel Mannehed <samuel@cendio.se>
Thu, 25 Aug 2016 14:49:02 +0000 (16:49 +0200)
include/ui.js

index 058ae5a41dd90eedfd42b2c1e1b89c4b9f7b2a15..03863634de33971bff02c0214da42b0897639c9c 100644 (file)
@@ -158,12 +158,12 @@ var UI;
 
             // While connected we want to display a confirmation dialogue
             // if the user tries to leave the page
-            Util.addEvent(window, 'beforeunload', function () {
+            Util.addEvent(window, 'beforeunload', function (e) {
                 if (UI.rfb && UI.rfb_state === 'normal') {
                     var msg = "You are currently connected.";
                     e.returnValue = msg;
                     return msg;
-                else {
+                else {
                     return void 0; // To prevent the dialogue when disconnected
                 }
             });