Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add datalist element normalization #153

Closed
yefremov opened this Issue · 1 comment

2 participants

@yefremov

Please add datalist element normalization as it states in WHATWG 4.10.10 The datalist element spec:

In the rendering, the datalist element represents nothing and it, along with its children, should be hidden.

Problem: IE 6/7/8/9 renders datalist and its option elements.

I have created fiddle http://jsfiddle.net/fyH7Y/, so you can test more browsers.

@necolas
Owner

That's the point of the datalist design (although I don't think the spec is all that clear about it from an author perspective).

You're meant to include just option elements with value attributes:

<datalist id="furniture">
    <option value="chair"></option>
    <option value="table"></option>
    <option value="bed"></option>
</datalist>

This won't show at all in legacy browsers. Or you do something more complicated to act as fallback content when the browser doesn't support datalist, e.g.:

http://jsfiddle.net/fyH7Y/2/

Hope that helps.

@necolas necolas closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.