W3C home > Mailing lists > Public > public-html@w3.org > August 2010

<select> element @size default

From: Mike Taylor <miketaylr@gmail.com>
Date: Thu, 12 Aug 2010 17:55:16 -0400
Message-ID: <4C646DC4.6060609@gmail.com>
To: HTMLWG WG <public-html@w3.org>

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?

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

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 12 August 2010 21:55:48 GMT