diff --git a/auto-complete.js b/auto-complete.js index 2f5a88c..f5eda77 100644 --- a/auto-complete.js +++ b/auto-complete.js @@ -104,6 +104,15 @@ var autoComplete = (function(){ } }, that.sc); + live('autocomplete-suggestion', 'touchstart', function(e){ + if (hasClass(this, 'autocomplete-suggestion')) { // else outside click + var v = this.getAttribute('data-val'); + that.value = v; + o.onSelect(e, v, this); + that.sc.style.display = 'none'; + } + }, that.sc); + that.blurHandler = function(){ try { var over_sb = document.querySelector('.autocomplete-suggestions:hover'); } catch(e){ var over_sb = 0; } if (!over_sb) {