Datalist arrow not coming in ie and firefox

后端 未结 4 573
醉话见心
醉话见心 2020-12-17 16:40

Hi I am using a datalist tag for a dropdown as in the fiddle. I am getting the arrow for dropdown in chrome only. and the arrow is not coming in ie and firefox. In firefox t

4条回答
  •  轮回少年
    2020-12-17 17:01

    Interesting. I tested this on my machine and got the same result :( The drop down arrow only appeared in Chrome, although in FF I could still select from the list but without a drop down arrow.

    What if you just used the SELECT tag instead?

    
    

    I did some more digging on this and found this post... HTML Form: Select-Option vs Datalist-Option

    It better explains the difference between datalist and select. That could also be why my suggestion of using SELECT instead might not be appropriate. But it could also explain the lack of the arrow. I don't see anywhere in the other discussions about the arrow being a guaranteed behaviour. The datalist may still function as an auto complete, but without the drop down arrow (although I just checked this again in IE11 and it doesn't even seem to do the autocomplete).

    Perhaps this can just get put down to how well different browsers implement this feature.

提交回复
热议问题