TextArea not accepting new lines via return button
I am having an issue with the use of the TextArea, where I am not able to add a new line via pressing 'return', as pressing 'return' simply blurs the field.
Any help would be appreciated :)
2 Answers
-
Accepted Answer
Set this to the textarea:
suppressReturn:false
-
Hi Matt
Using textarea.js as a starting point, I commented out some of the createTextArea properties to enable the return key to function the way you intend (ie create a new line):
var ta1 = Titanium.UI.createTextArea({ value:'I am a textarea', height:70, width:300, top:60, font:{fontSize:20,fontFamily:'Marker Felt', fontWeight:'bold'}, color:'#888', textAlign:'left', // appearance:Titanium.UI.KEYBOARD_APPEARANCE_ALERT, // keyboardType:Titanium.UI.KEYBOARD_NUMBERS_PUNCTUATION, // returnKeyType:Titanium.UI.RETURNKEY_EMERGENCY_CALL, borderWidth:2, borderColor:'#bbb', borderRadius:5, suppressReturn:false });
Hope this helps.