Use HTML5 (datalist) autocomplete with ‘contains’ approach, not just ‘starts with’
‘contains’ approach Maybe this is what you are looking for (part 1 of your question). It goes with the limitation of “starts with” and changes when a selection is made. ‘use strict’; function updateList(that) { if (!that) { return; } var lastValue = that.lastValue, value = that.value, array = [], pos = value.indexOf(‘|’), start = … Read more