{ "id": "63771", "key": "TIMOB-3139", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "12095", "description": "", "name": "Sprint 2012-03", "archived": true, "released": true, "releaseDate": "2012-02-12" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-03-11T22:23:16.000+0000", "created": "2011-04-15T03:37:51.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_tabgroup", "qe-testadded", "regression" ], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" } ], "issuelinks": [ { "id": "14564", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "84911", "key": "TIMOB-7200", "fields": { "summary": "Android: UI.window - open event does not fire for lightweight windows when window open method is after addEventListener", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "29489", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "115554", "key": "TIMOB-14130", "fields": { "summary": "Android: Window events, windows in the Tab and test", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } }, { "id": "21854", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "103010", "key": "TIMOB-11339", "fields": { "summary": "Android: TabGroup - Unexpected output in a console on Android", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "22556", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "104373", "key": "TIMOB-11664", "fields": { "summary": "Android: TabGroup: Tabgroup focus event fired twice on application launch and one of those with source as undefined", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "21331", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "101968", "key": "TIMOB-11117", "fields": { "summary": "iOS: TabGroup - TabGroup has undefined value", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-12-10T06:00:08.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h2. Problem\r\n\r\nAt the very least, focus doesn't fire:\r\n1. When the tab is opened\r\n2. When returning to a window from a child activity\r\n\r\nThis used to work in 1.5.x, but seems to have broken in 1.6.x.\r\n\r\nNote, test case below demonstrates problem still exists with CI Build Titanium 1.9.0 (2012/01/16 11:16 366b32d) with v8 runtime.\r\n\r\nh2. Test case\r\n\r\nTest case adapted from Pedro's code in the comments below.\r\n\r\n{code:lang=javascript|title=app.js}\r\nvar tabGroup = Ti.UI.createTabGroup();\r\n\r\nvar win1 = Ti.UI.createWindow({\r\n\turl:'win1.js'\r\n});\r\nvar tab1 = Ti.UI.createTab({\r\n\ttitle:'Tab 1',\r\n\twindow:win1\r\n});\r\n\r\nvar win2 = Ti.UI.createWindow({\r\n\ttitle:'Tab 2',\r\n\tbackgroundColor:'#fff'\r\n});\r\nvar tab2 = Ti.UI.createTab({\r\n\ttitle:'Tab 2',\r\n\twindow:win2\r\n});\r\n\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\n\r\ntab1.addEventListener('focus', function(e){\r\n\tTi.API.info('-------------> tab1 focus event fired! - ' + e); // not fired\r\n});\r\ntab2.addEventListener('focus', function(e){\r\n\tTi.API.info('-------------> tab2 focus event fired! - ' + e); // not fired\r\n});\r\nwin2.addEventListener('focus', function(e){\r\n\tTi.API.info('-------------> win2 focus event fired! - ' + e); // fired once\r\n});\r\n\r\ntabGroup.open();\r\n{code}\r\n\r\n{code:lang=javascript|title=win1.js}\r\nvar win = Ti.UI.currentWindow;\r\n\r\nwin.addEventListener('focus', function(e){\r\n Ti.API.info('-------------> win1 focus event fired! - ' + e); // fired once\r\n});\r\n{code}\r\n\r\nh2. Logs\r\n\r\n{code:lang=none|title=Console}\r\n 1945 AndroidRuntime D >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<\r\n 1945 AndroidRuntime D CheckJNI is ON\r\n 1945 AndroidRuntime D --- registering native functions ---\r\n 60 ActivityManager I Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.appcelerator.testing10/.Testing10Activity }\r\n 60 ActivityManager I Start proc com.appcelerator.testing10 for activity com.appcelerator.testing10/.Testing10Activity: pid=1951 uid=10044 gids={1015, 3003}\r\n 1945 AndroidRuntime D Shutting down VM\r\n 1945 AndroidRuntime I NOTE: attach of thread 'Binder Thread #3' failed\r\n 1951 TiApplication I (main) [0,0] checkpoint, app created.\r\n 1951 TiApplication I (main) [639,639] Titanium 1.9.0 (2012/01/16 11:16 366b32d)\r\n 1951 TiFastDev D (main) [416,1055] Enabling Fastdev on port 49986\r\n 1951 TiFastDev D (main) [14,1069] sent tokens successfully\r\n 1951 TiFastDev D (main) [1,1070] Fastdev session handshake succesful.\r\n 1951 TiApplication I (main) [12,1082] Titanium Javascript runtime: v8\r\n 1951 TiApplication W (main) [62,1144] activity stack is emtpy, unable to get current activity\r\n 1951 TiRootActivity I (main) [0,0] checkpoint, on root activity create, savedInstanceState: null\r\n 1951 TiApplication W (main) [239,239] activity stack is emtpy, unable to get current activity\r\n 1951 TiApplication W (main) [2,241] activity stack is emtpy, unable to get current activity\r\n 1951 TiApplication W (main) [13,254] activity stack is emtpy, unable to get current activity\r\n 1951 TiApplication E (KrollRuntimeThread) [1135,1389] APP PROXY: ti.modules.titanium.app.AppModule@44eb2230\r\n 1951 TiAssetHelper D Fetching \"app.js\" with Fastdev...\r\n 60 ActivityManager I Starting activity: Intent { cmp=com.appcelerator.testing10/ti.modules.titanium.ui.TiTabActivity (has extras) }\r\n 1951 TiRootActivity I (main) [0,0] checkpoint, on root activity resume. activity = com.appcelerator.testing10.Testing10Activity@44e89700\r\n 1951 TiTabActivity W (main) [244,244] Notifying TiTabGroup, activity is created\r\n 1951 TiDrawableReference W (main) [100,344] Could not open stream to get bitmap\r\n 1951 Window D Loading window with URL: win1.js\r\n 1951 Module D Loading module: win1 -> Resources/win1.js\r\n 1951 TiAssetHelper D Fetching \"win1.js\" with Fastdev...\r\n 1951 TiAPI I -------------> win1 focus event fired! - [object Object]\r\n 1951 TiDrawableReference W (main) [290,634] Could not open stream to get bitmap\r\n 60 ActivityManager I Displayed activity com.appcelerator.testing10/ti.modules.titanium.ui.TiTabActivity: 707 ms (total 105095 ms)\r\n 1951 TiAPI I -------------> win2 focus event fired! - [object Object]\r\n 1951 TiAnalyticsSvc W (Thread-12) [27687,28321] Analytics Service Started\r\n 1951 TiAnalyticsSvc I (Thread-12) [66,28387] Sending 1 analytics events.\r\n 1951 TiAnalyticsSvc W (Thread-12) [1129,29516] Stopping Analytics Service\r\n 60 torageMonitorService I Memory available. Cancelling notification\r\n 167 GoogleLoginService D onBind: Intent { act=android.accounts.AccountAuthenticator cmp=com.google.android.gsf/.loginservice.GoogleLoginService }\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: UI.Window - Window in tabgroup focus event does not fire", "creator": { "name": "nathanielmccallum", "key": "nathanielmccallum", "displayName": "Nathaniel McCallum", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nathanielmccallum", "key": "nathanielmccallum", "displayName": "Nathaniel McCallum", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "BROKEN on Android Samsung Epic 4G 2.2, 1.7.0.RC1", "comment": { "comments": [ { "id": "130143", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}
Assigning to Don for triage.
There is a helpdesk\nticket that encounter this bug. I have made a simple app:
\napp.js
\n\nvar tabGroup = Titanium.UI.createTabGroup();\n\nvar win1 = Titanium.UI.createWindow({\n url:'win.js'\n});\nvar tab1 = Titanium.UI.createTab({\n icon:'icon1.png',\n title:'Tab 1',\n window:win1\n});\n\nvar win2 = Titanium.UI.createWindow({\n title:'Tab 2',\n backgroundColor:'#fff'\n});\nvar tab2 = Titanium.UI.createTab({\n icon:'icon1.png',\n title:'Tab 2',\n window:win2\n});\n\ntabGroup.addTab(tab1);\ntabGroup.addTab(tab2); \n\ntabGroup.open();
\n
\nwin.js
\n\nvar win = Titanium.UI.currentWindow;\n\nwin.addEventListener('focus', function(e){\n Ti.API.info(e);\n});
\n
\nThe focus event is not firing.
\nTi. SDK 1.6.1
\nAndroid APIs 2.2