[AC-1791] Android: Titanium.UI.Tab onFocus and onBlur events are fired twice
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-03-06T20:57:57.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | ankur garha |
Assignee | Mauro Parra-Miranda |
Created | 2013-01-09T03:14:55.000+0000 |
Updated | 2016-03-08T07:40:41.000+0000 |
Description
*Problem description*
The onFocus and onBlur events of a TabGroup tab are fired twice on Android only.
*Test case*
var tabGroup = Ti.UI.createTabGroup();
var tab1 = Ti.UI.createTab({
title : 'Tab 1',
icon : 'KS_nav_ui.png',
window : Ti.UI.createWindow({
title : 'Tab 1',
backgroundColor : '#fff'
})
});
var tab2 = Ti.UI.createTab({
title : 'Tab 2',
icon : 'KS_nav_views.png',
window : Ti.UI.createWindow({
title : 'Tab 2',
backgroundColor : '#fff'
})
});
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
tab1.addEventListener('focus', function(e) {
Ti.API.info("client info tab got focus");
});
tab1.addEventListener('blur', function(e) {
Ti.API.info("client info tab lost focus");
});
tabGroup.open();
*Log*
client info tab got focus
client info tab got focus
client info tab lost focus
client info tab lost focus
I cannot reproduce this, what Android version are you using?