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 12797 - Define default maxlength for input
Summary: Define default maxlength for input
Status: RESOLVED INVALID
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-27 02:01 UTC by rasamassen
Modified: 2011-08-04 05:17 UTC (History)
4 users (show)

See Also:


Attachments

Description rasamassen 2011-05-27 02:01:45 UTC
http://www.w3.org/TR/2011/WD-html5-20110525/common-input-element-attributes.html#attr-input-maxlength

Should we define a default maxlength?  IE9 defines 2147483647, Ch11 defines 524288, and FF4 & O11.11 define -1.
Comment 1 Aryeh Gregor 2011-05-27 17:15:48 UTC
"""
The maxLength IDL attribute must reflect the maxlength content attribute, limited to only non-negative numbers.
"""
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#dom-input-maxlength

"""
If a reflecting IDL attribute has a signed integer type (long) that is limited to only non-negative numbers then, on getting, the content attribute must be parsed according to the rules for parsing non-negative integers, and if that is successful, and the value is in the range of the IDL attribute's type, the resulting value must be returned. If, on the other hand, it fails or returns an out of range value, or if the attribute is absent, the default value must be returned instead, or −1 if there is no default value.
"""
http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#reflect

There is no default value specified, so by the wording of the rules for reflection, a get must return -1 in lieu of the default value.  So effectively, the default value is -1.  Do you want the default value to be changed, or are you now okay with the status quo?
Comment 2 Michael[tm] Smith 2011-08-04 05:17:29 UTC
mass-move component to LC1