Since the change in #2290029: Thousands separator creates invalid value for HTML5 Number input, the <input> elements for 'number' components appear with no 'type' attribute at all.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | webform-number_type_attr-2315091-1.patch | 503 bytes | pjcdawkins |
Comments
Comment #1
pjcdawkins commentedComment #2
danchadwick commented@pjcdawkins -- I have no objection to this, and it wasn't intended, but the HTML5 spec specifies that text is the default. Is this causing you an issue?
Somewhat related, I just read that min, max, and step "must not be specified".
Ref: http://www.w3.org/TR/html5/forms.html#text-%28type=text%29-state-and-sea...
I am inclined to add the type=text attribute and leave the min/max/step with the thought that someone might use jQuery to convert this back to a number, if so desired.
Comment #3
pjcdawkins commentedWell, I noticed the issue because of CSS which acts on
input[type="text"]. That might not be ideal CSS of course, since as you say 'text' is the default, but it probably exists on quite a few sites.Yes I think 'min', 'max' and 'step' are harmless since the values they specify are actually correct and relevant (because the component is supposed to accept numbers).
Comment #4
danchadwick commented@pjcdawkins -- Thanks very much. Will commit for 7.x-4.0.
Comment #5
danchadwick commentedCommitted to 7.x-4.x and 8.x.
Comment #7
quicksketchThanks @pjcdawkins, we should have included that in the original adjustment.