[TIMOB-9436] Android:Tabgroup:Focus and Blur event listeners for a tabgroup are not getting called.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-07-13T04:50:24.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | Release 2.1.0, Sprint 2012-12 API |
Components | Android |
Labels | api, module_tabgroup, qe-and060112, qe-testadded, regression |
Reporter | Shyam Bhadauria |
Assignee | Josh Roesslein |
Created | 2012-06-06T23:43:24.000+0000 |
Updated | 2013-12-10T05:59:09.000+0000 |
Description
It is a regression.Not occurring over 2.0.2,2.0.1 and 1.8.2.
Refer the code below:
var tabGroup = Ti.UI.createTabGroup();
var win1 = Ti.UI.createWindow({
name: "win 1"
});
var tab1 = Ti.UI.createTab({
name: "Tab 1",
title:'Tab 1',
window:win1
});
var win2 = Ti.UI.createWindow({
name: "win 2",
title:'Tab 2',
backgroundColor:'#fff'
});
var tab2 = Ti.UI.createTab({
name: "Tab 2",
title:'Tab 2',
window:win2
});
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
tabGroup.addEventListener('focus', function(e){
Ti.API.info('-------------> this is focus of tabgroup');
Ti.API.info('-------------> tabGroup focus event fired! - ' + e.source.name);
});
tab1.addEventListener('focus', function(e){
Ti.API.info('-------------> this is focus of tab 1');
Ti.API.info('-------------> tab1 focus event fired! - ' + e.source.name);
});
tab2.addEventListener('focus', function(e){
Ti.API.info('-------------> this is focus of tab 2');
Ti.API.info('-------------> tab2 focus event fired! - ' + e.source.name);
});
win1.addEventListener('focus', function(e){
Ti.API.info('-------------> this is focus of win 1');
Ti.API.info('-------------> win1 focus event fired! - ' + e.source.name);
});
win2.addEventListener('focus', function(e){
Ti.API.info('-------------> this is focus of win 2');
Ti.API.info('-------------> win2 focus event fired! - ' + e.source.name);
});
tab1.addEventListener('blur', function(e){
Ti.API.info('-------------> this is blur of tab 1');
Ti.API.info('**************> tab1 blur event fired! - ' + e.source.name);
});
tab2.addEventListener('blur', function(e){
Ti.API.info('-------------> this is blur of tab 2');
Ti.API.info('**************> tab2 blur event fired! - ' + e.source.name);
});
win1.addEventListener('blur', function(e){
Ti.API.info('-------------> this is blur of win 1');
Ti.API.info('**************> win1 blur event fired! - ' + e.source.name);
});
win2.addEventListener('blur', function(e){
Ti.API.info('-------------> this is blur of win 2');
Ti.API.info('**************> win2 blur event fired! - ' + e.source.name);
});
tabGroup.open();
Issue -> The focus and blur events of tabgroup are not getting called.
Attached are the log traces of SDKs 2.0.2 and 2.1.0.
Attachments
File | Date | Size |
---|---|---|
Logging2.0.2.txt | 2012-06-06T23:43:24.000+0000 | 713 |
Logging2.1.0.txt | 2012-06-06T23:43:24.000+0000 | 266 |
[PR #2351](https://github.com/appcelerator/titanium_mobile/pull/2351) sent to resolve issue.
Closing issue Tested with Ti Studio build 2.1.0.201206172244 Ti Mobile SDK2.1.0.v20120618134156 hash r00905cd0 OSX Lion 10.7.3 iPhone 4S OS 5.1, Nexus S OS 4.0.4 The expected behavior is shown
Re-opening to edit label
Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/5074