Commit 5b7598ac authored by samhed's avatar samhed

Use our own event registration function for keyboardinputReset.

parent a4370793
...@@ -17,7 +17,6 @@ var UI; ...@@ -17,7 +17,6 @@ var UI;
// Load supporting scripts // Load supporting scripts
window.onscriptsload = function () { UI.load(); }; window.onscriptsload = function () { UI.load(); };
window.onload = function () { UI.keyboardinputReset(); };
Util.load_scripts(["webutil.js", "base64.js", "websock.js", "des.js", Util.load_scripts(["webutil.js", "base64.js", "websock.js", "des.js",
"keysymdef.js", "keyboard.js", "input.js", "display.js", "keysymdef.js", "keyboard.js", "input.js", "display.js",
"jsunzip.js", "rfb.js", "keysym.js"]); "jsunzip.js", "rfb.js", "keysym.js"]);
...@@ -139,6 +138,8 @@ var UI; ...@@ -139,6 +138,8 @@ var UI;
UI.setViewClip(); UI.setViewClip();
Util.addEvent(window, 'resize', UI.setViewClip); Util.addEvent(window, 'resize', UI.setViewClip);
Util.addEvent(window, 'load', UI.keyboardinputReset);
Util.addEvent(window, 'beforeunload', function () { Util.addEvent(window, 'beforeunload', function () {
if (UI.rfb_state === 'normal') { if (UI.rfb_state === 'normal') {
return "You are currently connected."; return "You are currently connected.";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment