Quantcast
Viewing all articles
Browse latest Browse all 3527

Populate datalist options dynamically prevents the autocomplete box show up correctly.

For the below demo:

<input id="input" list="list" /><datalist id="list"></datalist><script>
    input.addEventListener("input", function () {
      list.innerHTML = (["a", "b", "c"]).map(function (t) { return input.value + t; }).map(function (t) {
        return "<option value='" + t + "'>"
      }).join('')
    });</script>

It's IE10's buggy behavior. Both Chrome and Firefox behaves correctly and popups the autocompletion box as the user types.

This behavior makes ajax search suggestions totally useless. Any suggestions? 




Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>