[TIMOB-23835] Android: TextField's focusable property does not take effect after setting it to false once.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-12-12T16:38:12.000+0000 |
Affected Version/s | Release 5.4.0, Release 5.3.1 |
Fix Version/s | n/a |
Components | n/a |
Labels | Android, TextField, Titanum, focusable |
Reporter | Prashant Saini |
Assignee | Shak Hossain |
Created | 2016-07-22T07:00:37.000+0000 |
Updated | 2016-12-12T16:38:12.000+0000 |
Description
*index.xml*
<Alloy>
<Window backgroundColor="black">
<TextField left="20" right="20" color="white" backgroundColor="#aaa" borderWidth="1" borderColor="white" id="OTHER_FIELD" hintText="Focus + Edit" />
<Button onClick="noFocusNoEdit" bottom="70">No-FOCUS + No-EDIT</Button>
<Button onClick="focusEdit" bottom="20">FOCUS + EDIT</Button>
</Window>
</Alloy>
*index.js*
function noFocusNoEdit() {
$.OTHER_FIELD.focusable = false;
$.OTHER_FIELD.editable = false;
$.OTHER_FIELD.hintText = 'No-Focus + No-Edit';
}
function focusEdit() {
$.OTHER_FIELD.focusable = true;
$.OTHER_FIELD.editable = true;
$.OTHER_FIELD.hintText = 'Focus + Edit';
}
$.index.open();
Attachments
File | Date | Size |
---|---|---|
environment.txt | 2016-08-29T09:04:28.000+0000 | 13485 |
I was expecting that TextField will regain focus on setting focusable=true, but it did not. I need to do this setting to reset the TextField underline color to default grey, which turns to Android theme color on focus. editable property works as expected.
This is my environment information in text file. Ti SDK used in that code is 5.3.1.GA and 5.4.0.GA as well.
Hello, I have tested hte issue with SDK 6.0.0.GA. The issue is not reproducible there. Verified fix: