Use proper soft keyboard events

...or as close as it gets because the way input events work on mobile is awful.
This commit is contained in:
2017-09-09 14:55:54 +02:00
parent 93824964ed
commit 7407419e56
3 changed files with 57 additions and 25 deletions
-15
View File
@@ -71,15 +71,6 @@
window.noAutoShow = true;
termInit(); // the screen will be loaded via ajax
Screen.load('%j:labels_seq%');
// auto-clear the input box
$('#softkb-input').on('input', function(e) {
setTimeout(function(){
var str = $('#softkb-input').val();
$('#softkb-input').val('');
Input.sendString(str);
}, 1);
});
} catch(e) {
console.error(e);
console.error("Fail, reloading in 3s…");
@@ -87,10 +78,4 @@
location.reload(true);
}, 3000);
}
function kbOpen(yes) {
var i = qs('#softkb-input');
if (yes) i.focus();
else i.blur();
}
</script>