[TIMOB-9533] Android: TabGroup: Click on window fires event of Tab and TabGroup
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Invalid |
| Resolution Date | 2012-06-16T00:15:26.000+0000 |
| Affected Version/s | Release 2.1.0 |
| Fix Version/s | n/a |
| Components | Android |
| Labels | api, qe-and060112, regression |
| Reporter | Satyam Sekhri |
| Assignee | Neeraj Gupta |
| Created | 2012-06-14T00:55:21.000+0000 |
| Updated | 2017-03-09T23:30:09.000+0000 |
Description
The click on window of the tab, fires click event for Tab and the TabGroup
Regression. This does not occur on 2.0.2
Steps to Reproduce:
1. Create app with code below and run app.
2. Tap Tab 1.
3. Tap Tab 2.
3. Tap Window 2. Check console.
Actual: After Step 3, the console shows message from click event of tab and TabGroup
Expected: There should be no console output on click of window
{Code}
Titanium.UI.setBackgroundColor('#000');
// create tab group
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',
title:'Tab 1',
window:win1
});
var label1 = Titanium.UI.createLabel({
color:'#999',
text:'I am Window 1',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'auto'
});
win1.add(label1);
var win2 = Titanium.UI.createWindow({
title:'Tab 2',
backgroundColor:'#fff'
});
var label2 = Titanium.UI.createLabel({
color:'#999',
text:'I am Window 2',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'auto'
});
win2.add(label2);
var tab2 = Titanium.UI.createTab({
icon:'KS_nav_ui.png',
title:'Tab 2',
window:win2
});
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
tabGroup.open();
tabGroup.addEventListener('click', function(e) {
Ti.API.info("clicked tabgroup");
});
tab1.addEventListener('click', function(e) {
Ti.API.info("clicked tab1");
});
tab2.addEventListener('click', function(e) {
Ti.API.info("clicked tab2");
});
{Code}
Closing ticket as invalid.