summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/ui.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/ui.js b/include/ui.js
index 4748ff0..4132d05 100644
--- a/include/ui.js
+++ b/include/ui.js
@@ -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.";