Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-10222] iOS: Implement maxLength for TextArea #2670

Merged
merged 4 commits into from Aug 7, 2012
Merged

[TIMOB-10222] iOS: Implement maxLength for TextArea #2670

merged 4 commits into from Aug 7, 2012

Conversation

vishalduggal
Copy link
Contributor

Test is in JIRA

@WhichKatieDid
Copy link
Contributor

CR approved, might have issues when pasting in text areas, but will double-check in FR.

@WhichKatieDid
Copy link
Contributor

FR rejected. Having maxLength set before the view is added to the view hierarchy causes value not to be applied.

var win = Ti.UI.createWindow();
var txt = Ti.UI.createTextArea({
top: 150,
height: 100,
width:300,
backgroundColor: "white",
value: '123456789'
});
txt.maxLength = 10;
var button = Ti.UI.createButton( {title: "set max length to 10"});
button.addEventListener('click', function(e) {txt.value = '12345678901234567890';});
Ti.API.info("maxLength: " + txt.maxLength);
win.add(txt);
win.add(button);
win.open();

Other issue: When you set a value to over the maxlength, it's truncated. If the user pastes into the textfield and it'd go over the maxlength, the entire paste is rejected outright. This should probably be made consistent.

@vishalduggal
Copy link
Contributor Author

Ready for review

@WhichKatieDid
Copy link
Contributor

CR and FR passed. Merging...

WhichKatieDid added a commit that referenced this pull request Aug 7, 2012
[TIMOB-10222] iOS: Implement maxLength for TextArea
@WhichKatieDid WhichKatieDid merged commit 575ea32 into tidev:master Aug 7, 2012
@vishalduggal vishalduggal deleted the timob-10222 branch October 27, 2014 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants