Fueled / ethanol-ui-components

1 stars 0 forks source link

Setting a Text Programmatically Into Textfield With Maximum Length Specified Should Not Allow To Exceed This Limit #4

Closed bastien-fueled closed 9 years ago

bastien-fueled commented 9 years ago

When I specify a maximum length to a ETHTextField (public property maximumLength) and am typing some text in this text field, it is not possible to exceed that limit.

However, if I set a String programmatically to that text field with a length that exceeds the text field's maximum length, the verification is not made anymore, the entire String is set in the text field. This text should be shortened to the maximum length of the text field.

ethTextfield.maximumLength = 10
ethTextfield.text = "That's a pretty long text"
// Text displayed is "That's a pretty long text" with length = 24
// It should be "That's a p" with length = 10