UX: Keep focus on input after selecting an autocomplete option
This is particularly helpful on mobile, now tapping on an item from the autocomplete dropdown keeps the keyboard visible.
This commit is contained in:
parent
68fdfd76f5
commit
7bc496070f
|
@ -274,6 +274,9 @@ export default function(options) {
|
||||||
ul.find("li").click(function() {
|
ul.find("li").click(function() {
|
||||||
selectedOption = ul.find("li").index(this);
|
selectedOption = ul.find("li").index(this);
|
||||||
completeTerm(autocompleteOptions[selectedOption]);
|
completeTerm(autocompleteOptions[selectedOption]);
|
||||||
|
if (!options.single) {
|
||||||
|
me.focus();
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
var pos = null;
|
var pos = null;
|
||||||
|
|
Loading…
Reference in New Issue