You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@click.apache.org by "Finn Bock (JIRA)" <ji...@apache.org> on 2010/07/01 22:56:51 UTC

[jira] Commented: (CLK-601) TextField sets size when not appropriate

    [ https://issues.apache.org/jira/browse/CLK-601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884417#action_12884417 ] 

Finn Bock commented on CLK-601:
-------------------------------

On the browser I have tested with, the size of a <input type="text"> field seems to be 20.

  http://people.apache.org/~bckfnn/text-size.html

In html5 the default value for size is defined as 20 (at least I think it is):

  http://www.w3.org/TR/2010/WD-html5-20100624/rendering.html#the-input-element-as-a-text-entry-widget

So I think the suggested change is ok.

Regarding <textarea> the default size is 20/2 on my browsers, and is defined in html5 to be 20/2:

  http://www.w3.org/TR/2010/WD-html5-20100624/the-button-element.html#attr-textarea-cols-value
  http://www.w3.org/TR/2010/WD-html5-20100624/the-button-element.html#attr-textarea-rows-value

so doing the same on textarea will by a change from the current default values of 20/3.

> TextField sets size when not appropriate
> ----------------------------------------
>
>                 Key: CLK-601
>                 URL: https://issues.apache.org/jira/browse/CLK-601
>             Project: Click
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 2.1.0 RC1
>            Reporter: WarnerJan Veldhuis
>            Priority: Trivial
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.