Remove beforeunload handler

Support for this is spotty and it is getting more and more restricted
by the day. Give up on this approach.
This commit is contained in:
Pierre Ossman 2016-09-01 12:35:22 +02:00
parent 0f6af1e3ec
commit 3e3eec28f3
1 changed files with 0 additions and 12 deletions

View File

@ -183,18 +183,6 @@ var UI;
UI.updateViewDrag();
UI.setBarPosition();
} );
// While connected we want to display a confirmation dialogue
// if the user tries to leave the page
window.addEventListener('beforeunload', function (e) {
if (UI.rfb && UI.rfb_state === 'normal') {
var msg = "You are currently connected.";
e.returnValue = msg;
return msg;
} else {
return void 0; // To prevent the dialogue when disconnected
}
});
},
setupFullscreen: function() {