<select> element @size default

Per the spec, a select element without a required attribute should have its size attribute default to 1 (http://www.whatwg.org/specs/web-apps/current-work/complete.html#the-select-element).

"The size attribute gives the number of options to show to the user. The size attribute, if specified, must have a value that is a valid non-negative integer greater than zero. If the multiple attribute is present, then the size attribute's default value is 4. If the multiple attribute is absent, then the size attribute's default value is 1."

A simple test like alert(document.createElement('select').size == 1) fails in the latest versions of Opera, Safari/Chrome, Firefox and IE; in fact, they all default to 0.

Should the spec be changed to document the current behavior, or should we try to get the browsers to implement to 1?

-Mike

Received on Thursday, 12 August 2010 21:55:45 UTC