I have a TextField in my app that is doubling up on the text. What I mean is if I type “dog” the it returns “dogDog” notice how it capitalized it?
var searchText = Ti.UI.createTextField({
borderRadius:5,
hintText : 'Enter Search Text',
color:"#0000FF",
borderColor:"#0000FF",
font:{fontSize: 30},
width:400,
top:50
});
searchText.addEventListener('return',textEntered);
function textEntered(){
Titanium.API.info(searchText.getValue());// logs "dogDog" when should be "dog"
}
Use the properties which are being send with the event. (doc http://docs.appcelerator.com/titanium/2.1/#!/api/Titanium.UI.TextField-event-return)