Add missing event argument and curly bracket
This commit is contained in:
parent
708509d691
commit
828debf69a
@ -158,12 +158,12 @@ var UI;
|
|||||||
|
|
||||||
// While connected we want to display a confirmation dialogue
|
// While connected we want to display a confirmation dialogue
|
||||||
// if the user tries to leave the page
|
// 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') {
|
if (UI.rfb && UI.rfb_state === 'normal') {
|
||||||
var msg = "You are currently connected.";
|
var msg = "You are currently connected.";
|
||||||
e.returnValue = msg;
|
e.returnValue = msg;
|
||||||
return msg;
|
return msg;
|
||||||
else {
|
} else {
|
||||||
return void 0; // To prevent the dialogue when disconnected
|
return void 0; // To prevent the dialogue when disconnected
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user