I have an application built in Html5 and wrapped in PhoneGap for Android
I have an auto-complete input
On a computer auto-complete input works great!
In SmartPhone, the auto-complete works only after you make space on the Input
(If write numbers first - works! If letters - works only after space)
Why?
JS code:
//Run in document.ready
function AutoComplete() {
List = $.map(data.XXX, function (item) {
return {
label: item.X,
value: item.XX
};
});
$("#MyInput").autocomplete({
source: List,
link: '#',
target: $('#MyList'),
minLength: 1
});
}
HTML:
The input:
<input id="MyInput" type="text"
placeholder="XXX" />
The List:
<ul id="MyList" data-role="listview" data-inset="true"> </ul>
Try adding autocomplete="off" to the input tag.
I am not sure ,but try after giving
minlength :0
and execute the autocomplete on keypress
may be this will give u output.
have a look at these links also
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With