Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11357] Android: TabGroup - Unexpected console output on Android

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-12-21T05:15:02.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.0, Release 3.1.0, 2012 Sprint 21 API, 2012 Sprint 21
ComponentsAndroid
Labelsapi, module_tabgroup, qe-and100112, qe-testadded, regression, tabgroup
ReporterTamila Smolich
AssigneeHieu Pham
Created2012-10-10T18:28:33.000+0000
Updated2013-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

Comments

  1. Hieu Pham 2012-10-13

    3.0.X PR: https://github.com/appcelerator/titanium_mobile/pull/3195 Master PR: https://github.com/appcelerator/titanium_mobile/pull/3175
  2. Tamila Smolich 2012-10-17

    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)

JSON Source