1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-24 16:55:22 +03:00

bugfix for glitchy vertical text position in CLI

This commit is contained in:
cTn 2014-05-26 14:11:30 +02:00
parent 5042d2af2e
commit 6d38e301ef
3 changed files with 9 additions and 6 deletions

View file

@ -43,18 +43,21 @@ function tab_initialize_cli() {
serial.send(bufferOut, function(writeInfo) {});
var textarea = $('.tab-cli textarea');
textarea.keypress(function(event) {
if (event.which == 13) { // enter
var out_string = $('.tab-cli textarea').val();
event.preventDefault(); // prevent the adding of new line
var out_string = textarea.val();
var out_arr = out_string.split("\n");
cli_history.add(out_string.trim());
var timeout_needle = 0;
var timeout_needle = 0;
for (var i = 0; i < out_arr.length; i++) {
send_slowly(out_arr, i, timeout_needle++);
}
$('.tab-cli textarea').val('');
textarea.val('');
}
});
@ -69,7 +72,7 @@ function tab_initialize_cli() {
});
// give input element user focus
$('.tab-cli textarea').focus();
textarea.focus();
});
}