This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Section: http://www.whatwg.org/specs/web-apps/current-work/#the-select-element Comment: This test case alerts 0 in all current released browsers: data:text/html,<!doctype html><script>var el = document.createElement("select"); el.multiple = true; alert(el.size);</script> As it stands, the spec says it should alert 1. While we're in the habit of making the world making more sense, why not say that the default for the size IDL attribute is the same as for the size content attribute, namely that it's 4 if multiple is set and 1 otherwise? (What does it even mean for a content attribute to have a default?) Posted from: 68.175.61.233
I meant to add, the spec used to imply this until this commit: http://lists.whatwg.org/pipermail/commit-watchers-whatwg.org/2010/004731.html But then it went back to saying 1 across the board for some reason. Note that Firefox 4 does the 1-and-4 thing like the old spec version. volkmar and smaug mentioned something in #whatwg about a regression bug, but anyway, I can't see how "1 across the board" is any more web-compatible than "sometimes 1 and sometimes 4" if all current browsers make the default 0.
Okay, here's the Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=603141 So maybe it should just have a default of 0, or maybe all unsigned longs limited to only positive values should if no other default is specified. See also bug 10354, which is related. But it shouldn't have a default of 1 across the board, that makes no sense from any perspective.
I've changed it to zero per the Gecko bug. I haven't changed this for the other attributes; please file a separate bug for them if you think they should change (IIRC that change was the right change for the other attributes, and select.size is special). Re comment 1, I don't see how that patch affects this. 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: Concurred with one of the reporter's comments.
Checked in as WHATWG revision r5793. Check-in comment: change select.size once more, to match browsers http://html5.org/tools/web-apps-tracker?from=5792&to=5793
mass-moved component to LC1