This project is archived and is in readonly mode.

#5446 ✓invalid
Stephen Touset

HTML5 forbids the size attribute on input fields

Reported by Stephen Touset | August 24th, 2010 @ 04:30 PM

#5084 removed the size attribute from file_field input tags, but the bug actually extends to any and all input elements. The size attribute has been removed as of HTML5. DEFAULT_FIELD_OPTIONS should have its size key removed for HTML5 compatibility.

Comments and changes to this ticket

  • Stephen Touset

    Stephen Touset August 24th, 2010 @ 04:35 PM

    I should add, more than that, options["size"] is set to options["maxlength"] in to_input_field_tag, and this should be removed as well.

  • Stephen Touset

    Stephen Touset August 24th, 2010 @ 05:05 PM

    After a rereading of the spec, this bug is more complicated than I originally thought. The size attribute is not gone entirely, but applies to only specific fields. I will write up a more comprehensive bug report later. Please close this one, as it is invalid.

  • José Valim

    José Valim August 24th, 2010 @ 05:06 PM

    • State changed from “new” to “invalid”
    • Importance changed from “” to “Low”

    Ok, thanks Stephen!

  • Alexander S.

    Alexander S. August 24th, 2010 @ 07:23 PM

    Was just about to file this bug report, but Stephen was a step ahead. Great that you'll file it.

  • emery

    emery November 5th, 2010 @ 11:00 PM

    Why is this marked invalid? size should never be used in any input.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages