Problem Description
Steps to reproduce
1.Run following code
Expected result:
focus event should be fired on first focus.
Actual result:
No focus event fired on tab 1
Test case
var win1 = Ti.UI.createWindow({
title: 'Win 1'
});
var tab1 = Ti.UI.createTab({
title: 'Tab 1',
window: win1
});
var win2 = Ti.UI.createWindow({
title: 'Win 2'
});
var tab2 = Ti.UI.createTab({
title: 'Tab 2',
window: win2
});
var tabGroup = Ti.UI.createTabGroup({
});
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
tabGroup.open();
tabGroup.addEventListener('focus', function(e) {
Ti.API.info('--------------------Focus tab index: ' + e.index);
});
But if we press tab2 and then tab1 this works fine as expected.
Add focus and open listeners before calling open
always add focus event before calling open Invalid.
Same testcase works as expected on android, that is made me confused. Thank you.
Closing ticket as invalid.