Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12818] BlackBerry: TextField blur and focus

GitHub Issuen/a
TypeSub-task
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-02-22T02:55:52.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.1.0, 2013 Sprint 04 BB, 2013 Sprint 04
ComponentsBlackBerry
Labelsn/a
ReporterJosh Roesslein
AssigneeJosh Roesslein
Created2013-02-22T01:54:40.000+0000
Updated2017-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

  1. Lee Morris 2017-03-08

    Closing ticket as resolved.

JSON Source