R Doolabh R Doolabh - 15 days ago 5
CSS Question

HTML5 datalist tag is not populating in Safari

I have a datalist tag which allows my users to have a suggestion box. However, I've noticed that this feature is not supported in safari. Is there a workaround to this issue?

Here is my code - I'm actually populating my values with an ajax method but this is what it would look like after it's populated:

<datalist id="languages">
<option value="HTML">
<option value="CSS">
<option value="JavaScript">
<option value="Java">
<option value="Ruby">
<option value="PHP">
<option value="Go">
<option value="Erlang">
<option value="Python">
<option value="C">
<option value="C#">
<option value="C++">
</datalist>

Search:
<input type="text" list="languages">


I also have a fiddle here

Answer

Datalist elements are not supported in Safari. http://caniuse.com/#feat=datalist

Comments