[TIMOB-11684] iOS: TabGroup - TabGroup focus event is not fired when setActiveTab is called on the first tab for the first time
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-12-04T21:59:38.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | 2012 Sprint 25, 2012 Sprint 25 API |
Components | iOS |
Labels | qe-ios100112 |
Reporter | Anshu Mittal |
Assignee | Vishal Duggal |
Created | 2012-11-07T06:05:49.000+0000 |
Updated | 2014-06-19T12:44:16.000+0000 |
Description
TabGroup focus event is not fired when setActiveTab is called on the first tab for the first time.
This is not regression since the issue occurs as far as 2.1.2 GA as well.
Steps to reproduce:
1. Create an app with the code below.
2. Launch the app and see the logs.
Expected:
Log message should be printed for the first time also.
Actual behavior:
Log is not printed.
var win1 = Ti.UI.createWindow({
title: 'Win 1'
});
var tab1 = Ti.UI.createTab({
icon: 'KS_nav_ui.png',
title: 'Tab 1',
window: win1
});
var win2 = Ti.UI.createWindow({
title: 'Win 2'
});
var tab2 = Ti.UI.createTab({
icon: 'KS_nav_views.png',
title: 'Tab 2',
window: win2
});
var tabGroup = Ti.UI.createTabGroup({
});
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
tabGroup.setActiveTab(tab1);
tabGroup.open();
tabGroup.addEventListener('focus', function(e) {
Ti.API.info('--------------------Focus tab index: ' + e.index);
});
focus and open event handlers for top level containers (window, tabgroup) must be defined before open is called on the container.
closing as the bug is invalid