You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@click.apache.org by "WarnerJan Veldhuis (JIRA)" <ji...@apache.org> on 2009/12/30 14:33:29 UTC

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

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.


[jira] Issue Comment Edited: (CLK-601) TextField sets size when not appropriate

Posted by "Malcolm Edgar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12795468#action_12795468 ] 

Malcolm Edgar edited comment on CLK-601 at 12/30/09 10:14 PM:
--------------------------------------------------------------

I agree with this issue, however changing this behaviour may cause some issues with existing applications.  Will need to investigate potential impact.

I presume the same applies with HTML <textarea>

      was (Author: medgar):
    I agree with this issue, however changing this behaviour may cause some issues with existing applications.

Will need to investigate potential impact.
  
> 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.


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

Posted by "Malcolm Edgar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12795468#action_12795468 ] 

Malcolm Edgar commented on CLK-601:
-----------------------------------

I agree with this issue, however changing this behaviour may cause some issues with existing applications.

Will need to investigate potential impact.

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