summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolly Ross <sross@redhat.com>2016-07-01 14:50:30 -0400
committerSolly Ross <sross@redhat.com>2016-07-01 15:42:14 -0400
commit67685d0700ad3f26e59fd3a5309dad2d2d993782 (patch)
tree1d685135e0d6b65e2aa7aedb27c954bf6e06fa77
parent15e733f5330345b41e91927adaa2ce8f984f0593 (diff)
downloadnovnc-67685d0700ad3f26e59fd3a5309dad2d2d993782.tar.gz
Fix missing mistyped setTimeout handler in UI
This commit fixes a mistyped setTimeout handler that would result in the desired function not getting called (due to a missing set of parentheses). It also removes some uncessary anonymous functions, and just passes the function objects directly to setTimeout.
-rw-r--r--include/ui.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/ui.js b/include/ui.js
index 4fc6f09..be56d51 100644
--- a/include/ui.js
+++ b/include/ui.js
@@ -369,9 +369,7 @@ var UI;
parseInt(window.getComputedStyle(psp).width)/2 -30 + "px";
// Show the popup for a maximum of 1.5 seconds
- UI.popupStatusTimeout = setTimeout(function() {
- UI.closePopup();
- }, 1500);
+ UI.popupStatusTimeout = setTimeout(UI.closePopup, 1500);
},
closePopup: function() {
@@ -728,7 +726,7 @@ var UI;
UI.rfb.connect(host, port, password, path);
//Close dialog.
- setTimeout(function () { UI.setBarPosition; } );
+ setTimeout(UI.setBarPosition, 100);
$D('noVNC_logo').style.display = "none";
$D('noVNC_screen').style.display = "inline";
},
@@ -1155,7 +1153,7 @@ var UI;
// text has been added to the field
event.target.blur();
// This has to be ran outside of the input handler in order to work
- setTimeout(function() { UI.keepKeyboard(); }, 0);
+ setTimeout(UI.keepKeyboard, 0);
} else {
UI.lastKeyboardinput = newValue;
}