HTML5 datalist tag is not populating in Safari

前端 未结 6 1864
栀梦
栀梦 2020-12-01 06:39

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 issu

6条回答
  •  清歌不尽
    2020-12-01 07:04

    I realize its a bit late, but, for those who want a solution that mimics datalist on Safari, rather than replacing it with a select:

    https://github.com/Fyrd/purejs-datalist-polyfill

    Basically a short and sweet .js and .css that you can include in your html and it makes datalists linked inputs behave the same on Safari and Opera mini as they do on Chrome, Firefox and Android Browser.

提交回复
热议问题