[Webkit-unassigned] [Bug 99115] New: Constraint Validation API tooLong property incorrect with prefilled value
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Oct 11 16:30:08 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=99115
Summary: Constraint Validation API tooLong property incorrect
with prefilled value
Product: WebKit
Version: 528+ (Nightly build)
Platform: Macintosh
OS/Version: Mac OS X 10.8
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: Forms
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: tj.vantoll at gmail.com
Per the spec (http://www.whatwg.org/specs/web-apps/current-work/#constraint-validation-api) a form control's validity.tooLong property should be "true if the element's value is longer than the provided maximum length; false otherwise."
However, if you have an input that has a preset value that is greater than its maxlength the tooLong property will still be false:
<input id="foo" type="text" maxlength="1" value="AB">
<script>
document.getElementById('foo').validity.tooLong; //false
</script>
Furthermore when this element is in a form that form is allowed to submit - http://jsfiddle.net/tj_vantoll/x5LEn/.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list