This is not a regression. Seen in 3.4.1 SDK too.
If TabGroup is inside a TableView, Focus and Blur events are not firing after few times (more than 3 times) switching between tabs.
It works fine if it's not inside a TableView
Steps To Reproduce
1. Create a classic app with following code
Titanium.UI.setBackgroundColor('#000');
var tbl_data = [
{title:'Row 1'},
{title:'Row 2'},
{title:'Row 3'}
];
var table = Titanium.UI.createTableView({
data:tbl_data
});
table.addEventListener('click', function(event) {
Titanium.UI.setBackgroundColor('#000');
var tabGroup = Titanium.UI.createTabGroup();
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({
icon:'KS_nav_views.png',
active_icon:'KS_nav_ui.png',
inactive_icon:'KS_nav_views.png',
title:'Tab 1',
window:win1
});
tab1.addEventListener('focus',function(){
tab1.setIcon(tab1.active_icon);
});
tab1.addEventListener('blur',function(){
tab1.setIcon(tab1.inactive_icon);
});
var win2 = Titanium.UI.createWindow({
title:'Tab 2',
backgroundColor:'#fff'
});
var tab2 = Titanium.UI.createTab({
icon:'KS_nav_ui.png',
title:'Tab 2',
window:win2
});
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
tabGroup.open();
});
table.setData(tbl_data);
var win = Ti.UI.createWindow();
win.add(table);
win.open();
2. Run the app
3. Switch between tabs few times (more than 4 or 5 times)
Actual Result
Tab.active_icon property is failing to show after few times of switching
Expected Result
active_icon should show whenever tab is active
This is the duplicate of TIMOB-18155. Focus and Blur events are not called for tabs after few times if TabGroup is inside a TableView.