Uploaded image for project: 'Click'
  1. Click
  2. CLK-601

TextField sets size when not appropriate

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.1.0 RC1
    • Fix Version/s: 3.0.0
    • Component/s: core
    • Labels:
      None

      Description

      In the TextField class, the size attribute is always rendered regardless of the value of size. Since the size-attribute should be optional for the input-tag, it should be conditional, just as it is the case with maxLength and tabIndex. This would also mean that the default of 20 should be dropped.

      current code:
      buffer.appendAttribute("size", getSize());

      proposed code:
      if ( getSize() > 0 ) {
      buffer.appendAttribute("size", getSize());
      }

      Since the HTML-spec says size is implied, it should only be added if there is any size.

        Attachments

          Activity

            People

            • Assignee:
              a_adrian Adrian A.
              Reporter:
              surfman WarnerJan Veldhuis
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: