[TIMOB-9828] iOS: TabGroup - Removing the last tab from tabgroup does not refresh the screen.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-07-03T00:29:28.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | Release 2.1.0, Sprint 2012-13 API |
Components | iOS |
Labels | api, module_tabgroup, qe-ios060112, qe-testadded, regression |
Reporter | Neha Chhabra |
Assignee | Neeraj Gupta |
Created | 2012-06-28T04:07:30.000+0000 |
Updated | 2012-07-03T14:18:26.000+0000 |
Description
Removing the last tab from tabgroup does not refresh the screen and continues to show the window and title.
This is a regression.It works fine on 2.0.2
Steps to Reproduce:
1. Install the app on device and launch it.
2. Click on label Remove Tab 1
3. Click on label remove tab 2.
Expected Result:
After step 2, the Tab 1 should be removed.
After step 3, the Tab 2 should be removed and a blank screen should be shown.
Actual Result:
After step 2, the Tab 1 is removed.
After step 3, the Tab 2 is removed but the window and title of tab 2 continues to show. Also, a warning is shown in the console.Please find attached the log file.
On sending the app to the background and reopening it again,it now shows the blank screen.
app.js
// 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:'Remove Tab1',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'auto'
});
label1.addEventListener('click', function() {
tabGroup.removeTab(tab1);
label1 = win1 = tab1 = null;
});
win1.add(label1);
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
});
var label2 = Titanium.UI.createLabel({
color:'#999',
text:'remove tab2',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'auto'
});
label2.addEventListener('click', function() {
tabGroup.removeTab(tab2);
label2 = win2 = tab2 = null;
});
win2.add(label2);
// add tabs
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
// open tab group
tabGroup.open();
Attachments
File | Date | Size |
---|---|---|
logs.txt | 2012-06-28T04:07:30.000+0000 | 866 |
Screenshot.png | 2012-06-28T04:07:30.000+0000 | 10504 |
Verified fixed with SDK 2.1.0.v20120628121617 on iPad 3 and iPhone 4s.
Reopening to update labels.