Commit 3b8ec46f authored by samhed's avatar samhed

Make the touch-keyboard code more robust through verifying that global...

Make the touch-keyboard code more robust through verifying that global variables are set before use.
parent 205d1a11
...@@ -925,8 +925,15 @@ var UI; ...@@ -925,8 +925,15 @@ var UI;
// This code is required since some browsers on Android are inconsistent in // This code is required since some browsers on Android are inconsistent in
// sending keyCodes in the normal keyboard events when using on screen keyboards. // sending keyCodes in the normal keyboard events when using on screen keyboards.
keyInput: function(event) { keyInput: function(event) {
if (!UI.rfb) { return; }
var newValue = event.target.value; var newValue = event.target.value;
var oldValue = UI.lastKeyboardinput;
if (!UI.lastKeyboardinput) {
UI.keyboardinputReset();
}
var oldvalue = UI.lastKeyboardinput;
var newLen; var newLen;
try { try {
......
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