Use our own event registration function for keyboardinputReset.

This commit is contained in:
samhed 2015-02-06 15:53:10 +01:00
parent 3cd89eb403
commit e8445b5e4e

View File

@ -17,7 +17,6 @@ var UI;
// Load supporting scripts
window.onscriptsload = function () { UI.load(); };
window.onload = function () { UI.keyboardinputReset(); };
Util.load_scripts(["webutil.js", "base64.js", "websock.js", "des.js",
"keysymdef.js", "keyboard.js", "input.js", "display.js",
"jsunzip.js", "rfb.js", "keysym.js"]);
@ -139,6 +138,8 @@ var UI;
UI.setViewClip();
Util.addEvent(window, 'resize', UI.setViewClip);
Util.addEvent(window, 'load', UI.keyboardinputReset);
Util.addEvent(window, 'beforeunload', function () {
if (UI.rfb_state === 'normal') {
return "You are currently connected.";