This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9935 - select tag's size attribute default value discrepency
Summary: select tag's size attribute default value discrepency
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-16 09:33 UTC by ccjensen.bugzilla
Modified: 2010-10-04 14:45 UTC (History)
4 users (show)

See Also:


Attachments
Test case for default size reported in DOM (543 bytes, text/html)
2010-06-16 09:33 UTC, ccjensen.bugzilla
Details

Description ccjensen.bugzilla 2010-06-16 09:33:23 UTC
Created attachment 888 [details]
Test case for default size reported in DOM

It seems that neither Opera (latest build), Firefox v3.6.3, Chrome v6.0.427.0 (dev) nor Internet Explorer 8 (v8.0.6001.18702) implements this spec for the
select's size tag (HTML5):

"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."

I have attached a few test cases. They all pass if a size is
specifically set, but all seem to report 0 if size is set to an invalid
value or not set at all. Seems to me that the spec says the default
should be 1.

Either all browsers need to change their implementations, or the spec needs to define the default value as 0 instead of 1.
Comment 1 Ian 'Hixie' Hickson 2010-08-27 23:09:07 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: I've added a clarifying statement to the spec, but the spec was correct — you were testing the IDL attribute, which is defined separately (and has no default).
Comment 2 contributor 2010-08-27 23:13:29 UTC
Checked in as WHATWG revision r5380.
Check-in comment: Clarify input.size behaviour.
http://html5.org/tools/web-apps-tracker?from=5379&to=5380