Closed Bug 1251830 Opened 10 years ago Closed 10 years ago

HTML5 Number Input does not honor the Size attribute

Categories

(Core :: CSS Parsing and Computation, defect)

44 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: bugzilla, Unassigned)

Details

Attachments

(1 file)

Attached file number-field-size.html
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:44.0) Gecko/20100101 Firefox/44.0 Build ID: 20160210153822 Steps to reproduce: The attached test case is a valid HTML5 document with a form containing various types of input fields with different sizes. Actual results: The input fields of type "number" are always the same width despite the size attribute being different. The other input fields have different widths as expected. Google Chrome appears to have the same issue. Expected results: Number fields need to have consistent behaviour.
Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core
It looks like we follow what the spec says here: https://html.spec.whatwg.org/multipage/forms.html#number-state-%28type=number%29 "The following content attributes must not be specified and do not apply to the element: accept, alt, checked, dirname, formaction, formenctype, formmethod, formnovalidate, formtarget, height, inputmode, maxlength, minlength, multiple, pattern, size, src, and width." Resolving as invalid since we're compatible with the relevant spec, and with Chrome (per comment 0).
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
Well so it is... Hurrah for stupid HTML specs. I guess I was right to start forcing CSS widths on my number fields. I thought it was working on IE, until I discovered that was only because it doesn't understand number fiends at all and reverts to textfield behaviour.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: