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 you type "V" the list will show only items that start with "V" in Chrome, Opera and IE, and any <option> containing "V" in Firefox.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With