javascriptcsshtmlsafari

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


Solution

  • UPDATED: Datalist is now supported, as Safari 12.1 (2019)

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