Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18171] iOS: If TabGroup is inside a TableView, Focus and Blur events are not called when switching between tabs more than few times

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionDuplicate
Resolution Date2014-12-10T07:19:34.000+0000
Affected Version/sRelease 3.5.0
Fix Version/sn/a
ComponentsiOS
Labelsqe-3.5.0
ReporterKajenthiran Velummaylum
AssigneeIngo Muschenetz
Created2014-12-10T07:07:20.000+0000
Updated2014-12-10T07:19:34.000+0000

Description

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

Comments

  1. Kajenthiran Velummaylum 2014-12-10

    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.

JSON Source