[TIMOB-7637] Android: TextField - Ability to enter unlimited numbers of characters without clicking Unlimited length or Increase maxLength
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Cannot Reproduce |
| Resolution Date | 2013-03-12T10:56:24.000+0000 |
| Affected Version/s | Release 2.0.0 |
| Fix Version/s | Release 3.0.2 |
| Components | Android |
| Labels | n/a |
| Reporter | Tamila Smolich |
| Assignee | Shameer Jan |
| Created | 2012-02-13T12:44:07.000+0000 |
| Updated | 2017-03-21T21:31:45.000+0000 |
Description
Steps to reproduce:
1. Put following in app.js:
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
var tf = Ti.UI.createTextField({
value:'SAMPLE',
maxLength:20,
top:20,
left:20,
width:300,
height:60,
borderStyle:Ti.UI.INPUT_BORDERSTYLE_ROUNDED
});
win.add(tf);
var b = Ti.UI.createButton({
title:'Increase maxLength',
width:200,
height:40,
bottom:60
});
b.addEventListener('click', function(e) {
tf.maxLength += 5;
Ti.API.info('maxLength: '+tf.maxLength);
});
win.add(b);
var b2 = Ti.UI.createButton({
title:'Unlimited length',
width:200,
height:40,
bottom:120
});
b2.addEventListener('click', function(e) {
tf.maxLength = -1;
});
win.add(b2);
win.open();
2. Type into the text field
Expected result:
After Step 2 user can enter 20 characters or less
Actual result:
After Step 2 user can enter unlimited numbers of characters
Note: Tested on 1.8.1 build running rhino. The bug occurs in this build too.
The problem cannot reproduce with release 3.0.2
Closing ticket as the issue cannot be reproduced.