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}
HD ticket: http://support.appcelerator.com/tickets/APP-114148
I have verified on the latest CI build 2.1.0v20120608174150 and it is broken. Focus event does not fire.
Verified fixed in SDK 2.1.0.v20120615132253. Thanks!
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
Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4967