I have a number field. I want to select the text whenever the user touches it, so I handle its focus event. In the event call back function, I have call select function as below:
init : function() {
this.control({
'firstScreen #inputFieldSet numberfield' : {
focus : this.onPowerFieldGotFocus,
tap :this.keyPressed,
keyup : this.onTextChange
}
})
},
onPowerFieldGotFocus : function(test, test2, obj) {
test.select();
}
I do it like this as I don't want my users to have to press the delete button again and again when they want to change the existing value in number field. Once they touch the TextField
they can simply start writing to add the new value. It is working perfectly on most of the Android devices but not working on HTC devices. Very strange to me!! Can anyone provide a work-around? I am using Sencha Touch 2.