[TIMOB-11357] Android: TabGroup - Unexpected console output on Android
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-12-21T05:15:02.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 3.0.0, Release 3.1.0, 2012 Sprint 21 API, 2012 Sprint 21 |
Components | Android |
Labels | api, module_tabgroup, qe-and100112, qe-testadded, regression, tabgroup |
Reporter | Tamila Smolich |
Assignee | Hieu Pham |
Created | 2012-10-10T18:28:33.000+0000 |
Updated | 2013-06-11T18:15:07.000+0000 |
Description
Description:
Noticed an unexpected console output, while testing TabGroup. When opening a second window by clicking an "open win2" button, should see in the console "win1 blurred, win2 focused", but the console shows "win2 blurred, win2 focused". The same output ("win2 blurred, win2 focused") is showing when closing the second window and opening the first one.
This is a regression, does not occur on 2.1.3.
Steps:
1. Run the following code and check the console:
var win1 = Titanium.UI.createWindow();
var button1 = Ti.UI.createButton({title:'Open win2'});
button1.addEventListener('click', function(){ tab1.open(win2); });
win1.add(button1);
//create win2. button2 closes win2
var win2 = Titanium.UI.createWindow({title:'Window 2'});
var button2 = Titanium.UI.createButton({title:'Close win2'});
button2.addEventListener('click', function(){ win2.close(); });
win2.add(button2);
win1.addEventListener('focus', function(e){Ti.API.info('win1 focused');});
win1.addEventListener('blur', function(e){Ti.API.info('win1 blurred');});
win2.addEventListener('focus', function(e){Ti.API.info('win2 focused');});
win2.addEventListener('blur', function(e){Ti.API.info('win2 blurred');});
var tabGroup = Titanium.UI.createTabGroup();
var tab1 = Titanium.UI.createTab({title:'Tab 1',window:win1});
tabGroup.addTab(tab1);
tabGroup.open();
2. Click "open win2" button
3. Click "close win2" button
Expected result:
After step 2 should see in the console:
I/TiAPI(6623): win1 blurred
I/TiAPI(6623): win2 focused
After step 2 should see in the console:
I/TiAPI(6623): win2 blurred
I/TiAPI(6623): win1 focused
Actual result:
After steps 2 and 3 the console output looks the same:
I/TiAPI(6623): win2 blurred
I/TiAPI(6623): win2 focused
3.0.X PR: https://github.com/appcelerator/titanium_mobile/pull/3195 Master PR: https://github.com/appcelerator/titanium_mobile/pull/3175
Closing as fixed. Verified and tested on: Titanium Studio, build: 3.0.0.201210151149 Titanium SDK, builds: 3.0.0.v20121017100120; 3.1.0.v20121017102121 Device: Nexus 7 (4.1.1)