[TIMOB-12818] BlackBerry: TextField blur and focus
GitHub Issue | n/a |
Type | Sub-task |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-02-22T02:55:52.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 3.1.0, 2013 Sprint 04 BB, 2013 Sprint 04 |
Components | BlackBerry |
Labels | n/a |
Reporter | Josh Roesslein |
Assignee | Josh Roesslein |
Created | 2013-02-22T01:54:40.000+0000 |
Updated | 2017-03-08T18:26:24.000+0000 |
Description
Implement the blur and focus methods for TextFields.
Acceptance Test
var win = Ti.UI.createWindow();
var textfield = Ti.UI.createTextField();
win.add(textfield);
textfield.addEventListener('focus', function() {
Ti.API.info('focus');
});
textfield.addEventListener('blur', function() {
Ti.API.info('blur');
});
setTimeout(function() {
textfield.focus();
setTimeout(function() {
textfield.blur();
}, 2000);
}, 2000);
win.open();
```
1. Wait a couple seconds after the app launches.
2. Verify the textfield automatically gains focus.
There should also be a log "focus" printed.
3. Wait another couple seconds after focus.
There should also be a log "blur" printed.
4. The textfield should have lost focus.
5. Try focusing the field by clicking on it.
A log "focus" should be printed and the keyboard presented.
6. Blur the field by tapping elsewhere in the window (background).
It should be blurred and a log "blur" printed.
Comments
JSON Source
Closing ticket as resolved.