mirror of
https://github.com/novnc/noVNC.git
synced 2026-05-27 23:49:39 +00:00
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:
12
app/ui.js
12
app/ui.js
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user