I noticed that different browsers have different behavior regarding to suggesting values for a text field when you hook it up to a datalist. Some browsers show the entries which exactly starts with what you've typed(IE, older chrome versions), while others show entries which contain what you've typed as a sub-string (firefox, newer chrome versions).
For example, type i
into the text box, and observe the suggestions:
browser:
<datalist id="browsers">
<option value="Google Chrome">Google Chrome</option>
<option value="Internet Explorer">Internet Explorer</option>
<option value="Firefox">Firefox</option>
<option value="Opera">Opera</option>
<option value="Safari">Safari</option>
<option value="Others">Others?</option>
</datalist>
<input type="text" name="browser" list="browsers">
(or here's a fiddle, if you prefer http://jsfiddle.net/yaj8ut3m/ )
In IE, it will suggest only Internet Explorer
, but firefox & recent chrome will suggest Internet Explorer
, Firefox
, and Safari
.
Is there some way to specify which auto suggest filtering behavior to use?
note: javascript solutions aren't acceptable
This is unspecified option.
And known issue:
If the question is:
"Is there some way to specify which auto suggest filtering behavior to use?
note: javascript solutions aren't acceptable"
the answer will (sadly) be: No there isn't, this depend on browser's implementation and the datalist tag hasn't any attribute.
I have to say that is full of "plugins" and is relatively simply to write one but using js.