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.

Comments

pjcdawkins’s picture

Status: Active » Needs review
StatusFileSize
new503 bytes
danchadwick’s picture

@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.

pjcdawkins’s picture

Well, 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).

danchadwick’s picture

Status: Needs review » Reviewed & tested by the community

@pjcdawkins -- Thanks very much. Will commit for 7.x-4.0.

danchadwick’s picture

Priority: Normal » Minor
Status: Reviewed & tested by the community » Fixed

Committed to 7.x-4.x and 8.x.

quicksketch’s picture

Thanks @pjcdawkins, we should have included that in the original adjustment.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.