Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9483] Android: focus event no longer fires for Window

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-06-14T18:01:31.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sRelease 2.1.0, Sprint 2012-12 API
ComponentsAndroid
Labelsapi, module_window, qe-testadded, regression, titanbeta
ReporterShawn Lipscomb
AssigneeHieu Pham
Created2012-06-08T12:10:48.000+0000
Updated2013-12-10T06:17:04.000+0000

Description

Problem

There is a regression in Mobile SDK 2.1.0.v20120607180246 that causes the 'focus' event of Windows to not fire. Worded in 2.1.0.v20120520110234 Broken in 2.1.0.v20120607180246 *Expected Result*: console log should show {panel} == set simple event listeners successfully == open event == focus event {panel} *Actual Result*: console log shows only {panel} == set simple event listeners successfully == open event {panel}

Testcase

{panel:title=app.js}
var TheWindow=Ti.UI.createWindow({
                url:'win1.js',
                layout:'vertical',
                navBarHidden:false
              });
TheWindow.open();

{panel} {panel:title=win1.js}
var MainWin=Ti.UI.currentWindow;

function OnFocus()
{
  Ti.API.info('== focus event');
}

function OnOpen()
{
  Ti.API.info('== open event');
}

MainWin.addEventListener('focus',OnFocus);
MainWin.addEventListener('open',OnOpen);
Ti.API.info('== set simple event listeners successfully');
{panel}

Comments

  1. Shawn Lipscomb 2012-06-11

    HD ticket: http://support.appcelerator.com/tickets/APP-114148
  2. Anirudh Nagesh 2012-06-11

    I have verified on the latest CI build 2.1.0v20120608174150 and it is broken. Focus event does not fire.
  3. Shawn Lipscomb 2012-06-15

    Verified fixed in SDK 2.1.0.v20120615132253. Thanks!
  4. Michael Pettiford 2012-06-19

    Closing issue Tested with Ti Studio build 2.1.0.201206172244 Ti Mobile SDK 2.1.0.v20120618154152 hash r7830c03d OSX Lion 10.7.3 Nexus S OS 4.0.4 The expected behavior is shown
  5. Shameer Jan 2013-12-10

    Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4967

JSON Source