jquery-flexdatalist
jquery-flexdatalist copied to clipboard
On focus option arrow keys doesn't work on datalist
First of all thanks for your amazing tags library!!!! Found one issue while working with on focus with minLength set to 0. Arrow up and bottom keys seems to not functioning properly on datalist when focus is set to true. Please have a look at it.
hi i have the same problem
unfortunatly i ran into the same problem, hope this will be fixed soon! besides that > thanks for the great library!!!!
It seems that this problem was not fixed for long time. I have the same problem. On focus list is shown but when you press arrow down then first item is not selected. List is just refreshed. Someone know some workaround for this problem? Setting minLength to 1 helps but I need to open list immediately on focus.
I changed showAllResults function to:
/**
* Show all results if minLength option is 0.
*/
showAllResults: function (event) {
var val = $alias.val();
val = $.trim(val);
if (val === '' && _this.options.get('minLength') === 0 && $('ul.flexdatalist-results').length === 0) { // JK
_this.data.load(function (data) {
_this.results.show(data);
});
}
},
Thanks @kjuro! Your solution worked for me