summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2017-05-15 14:40:28 +0200
committerPierre Ossman <ossman@cendio.se>2017-05-15 14:42:28 +0200
commit55988e7aec698e8f23af943fdc268f998fc4eba5 (patch)
tree7d31c77174c2990ede388fa3ba135c8249d27cd4
parentafb621d577a9b90763761abdabeb9bfa8810981c (diff)
downloadnovnc-55988e7aec698e8f23af943fdc268f998fc4eba5.tar.gz
Fix bootstart of input field
It wasn't working properly anymore because it expected to be triggered by the "load". But we now register that event listener long after the "load" event has already fired.
-rw-r--r--app/ui.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/ui.js b/app/ui.js
index 194fefd..73ad2b4 100644
--- a/app/ui.js
+++ b/app/ui.js
@@ -98,6 +98,9 @@ const UI = {
document.getElementById("noVNC_status")
.addEventListener('click', UI.hideStatus);
+ // Bootstrap fallback input handler
+ UI.keyboardinputReset();
+
UI.openControlbar();
// Show the connect panel on first load unless autoconnecting
@@ -311,8 +314,6 @@ const UI = {
.addEventListener('touchend', UI.controlbarHandleMouseUp);
document.getElementById("noVNC_control_bar_handle")
.addEventListener('touchmove', UI.dragControlbarHandle);
-
- window.addEventListener('load', UI.keyboardinputReset);
},
addExtraKeysHandlers: function() {