Give focus to the input field immediately

This commit is contained in:
Martin Potier 2015-09-20 15:48:57 +02:00
parent 7498090e6e
commit d1f59bc91e
1 changed files with 6 additions and 0 deletions

View File

@ -220,6 +220,12 @@ function main() {
var currentSelection = 0;
//console.log(cisp.data);
//console.log(words.data);
$( "#question" ).focus();
$( "#question" ).click(function (e) {
$( "#question" ).val("");
});
$( "#question" ).keyup(function (e) {
var str = removeDiacritics($( "#question" ).val());
var cleanstr = str ? str.trim() : null;