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:
parent
0f6af1e3ec
commit
3e3eec28f3
12
app/ui.js
12
app/ui.js
|
@ -183,18 +183,6 @@ var UI;
|
||||||
UI.updateViewDrag();
|
UI.updateViewDrag();
|
||||||
UI.setBarPosition();
|
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() {
|
setupFullscreen: function() {
|
||||||
|
|
Loading…
Reference in New Issue