Pixabay / JavaScript-autoComplete

An extremely lightweight and powerful vanilla JavaScript completion suggester.
754 stars 186 forks source link

double click on Apple (touch hover) #9

Open Gade95 opened 8 years ago

Gade95 commented 8 years ago

hi, I solved the problem of double click on Apple (touch hover) by adding these events. live('autocomplete-suggestion', 'touchstart', function(e){ is_scrolling = false; }, that.sc); live('autocomplete-suggestion', 'touchmove', function(e){ is_scrolling = true; }, that.sc); live('autocomplete-suggestion', 'touchend', function(e){ if(!is_scrolling){ var v = this.getAttribute('data-val'); that.value = v; o.onSelect(e, v, this); } }, that.sc);

giacomomacri commented 8 years ago

HI, I've made a pull request, perhaps it will help you too, take a look at #10

Bye