{ "id": "93959", "key": "TIMOB-9811", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13417", "description": "Sprint 2012-13 API", "name": "Sprint 2012-13 API", "archived": true, "released": true, "releaseDate": "2012-07-01" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-06-27T15:11:43.000+0000", "created": "2012-06-27T00:28:25.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "module_tabgroup", "qe-and060112", "qe-testadded", "regression" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [ { "id": "22555", "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 } } } } ], "assignee": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-12-10T05:57:12.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": "This is a regression.It works fine with 2.0.2.\r\nFocus event fired for tab 1 is giving 'e.source.name=tab 2'\r\nPlease find logs attached for 2.0.2 and 2.1.0.\r\n\r\nSteps to reproduce\r\n1) Use the code below\r\n{code}\r\nvar tabGroup = Ti.UI.createTabGroup({\r\n\tname:\"tabgroup\"\r\n});\r\n\r\nvar win1 = Ti.UI.createWindow({\r\n\tname: \"win 1\"\r\n});\r\nvar tab1 = Ti.UI.createTab({\r\n\tname: \"Tab 1\",\r\n\ttitle:'Tab 1',\r\n\twindow:win1\r\n});\r\n\r\nvar win2 = Ti.UI.createWindow({\r\n\tname: \"win 2\",\r\n\ttitle:'Tab 2',\r\n\tbackgroundColor:'#fff'\r\n});\r\nvar tab2 = Ti.UI.createTab({\r\n\tname: \"Tab 2\",\r\n\ttitle:'Tab 2',\r\n\twindow:win2\r\n});\r\n\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\n\r\ntabGroup.addEventListener('focus', function(e){\r\n\tTi.API.info('-------------> tabGroup focus event fired! - ' + e.source.name);\r\n});\r\ntab1.addEventListener('focus', function(e){\r\n\tTi.API.info('-------------> tab1 focus event fired! - ' + e.source.name);\r\n});\r\ntab2.addEventListener('focus', function(e){\r\n\tTi.API.info('-------------> tab2 focus event fired! - ' + e.source.name);\r\n});\r\nwin1.addEventListener('focus', function(e){\r\n\tTi.API.info('-------------> win1 focus event fired! - ' + e.source.name);\r\n});\r\nwin2.addEventListener('focus', function(e){\r\n\tTi.API.info('-------------> win2 focus event fired! - ' + e.source.name);\r\n});\r\n\r\ntab1.addEventListener('blur', function(e){\r\n\tTi.API.info('**************> tab1 blur event fired! - ' + e.source.name);\r\n});\r\ntab2.addEventListener('blur', function(e){\r\n\tTi.API.info('**************> tab2 blur event fired! - ' + e.source.name);\r\n});\r\nwin1.addEventListener('blur', function(e){\r\n\tTi.API.info('**************> win1 blur event fired! - ' + e.source.name);\r\n});\r\nwin2.addEventListener('blur', function(e){\r\n\tTi.API.info('**************> win2 blur event fired! - ' + e.source.name);\r\n});\r\n\r\ntabGroup.open();\r\n{code}\r\n2) Run the app\r\n3) Tap on tab 2\r\n4) Tap on tab 1\r\n\r\nActual result:\r\n2) After step 2,the following appears in the console/logcat: \r\nI/TiAPI (10430): -------------> win1 focus event fired! - win 1\r\nI/TiAPI (10430): -------------> tab1 focus event fired! - Tab 1\r\nI/TiAPI (10430): -------------> tabGroup focus event fired! - Tab 1\r\n\r\n3) After step 3,the following appears in the console/logcat: \r\nI/TiAPI (10430): **************> win1 blur event fired! - win 1\r\nI/TiAPI (10430): -------------> win2 focus event fired! - win 2\r\nI/TiAPI (10430): **************> tab1 blur event fired! - Tab 1\r\nI/TiAPI (10430): -------------> tab2 focus event fired! - Tab 1\r\nI/TiAPI (10430): -------------> tabGroup focus event fired! - Tab 1\r\n\r\n4) After step 4,the following appears in the console/logcat: \r\nI/TiAPI (10430): **************> win2 blur event fired! - win 2\r\nI/TiAPI (10430): -------------> win1 focus event fired! - win 1\r\nI/TiAPI (10430): **************> tab2 blur event fired! - Tab 2\r\nI/TiAPI (10430): -------------> tab1 focus event fired! - Tab 2\r\nI/TiAPI (10430): -------------> tabGroup focus event fired! - Tab 2\r\n\r\nExpected result\r\n2) After step 2,the following appears in the console/logcat: \r\n-------------> tab1 focus event fired! - Tab 1 \r\n-------------> tabGroup focus event fired! - Tab 1 \r\n-------------> win1 focus event fired! - win 1\r\n\r\n3) After step 3,the following appears in the console/logcat: \r\nI/TiAPI (10262): **************> tab1 blur event fired! - Tab 1\r\nI/TiAPI (10262): **************> win1 blur event fired! - win 1\r\nI/TiAPI (10262): -------------> tab2 focus event fired! - Tab 2\r\nI/TiAPI (10262): -------------> tabGroup focus event fired! - Tab 2\r\nI/TiAPI (10262): -------------> win2 focus event fired! - win 2\r\n\r\n4) After step 4,the following appears in the console/logcat: \r\nI/TiAPI (10262): **************> tab2 blur event fired! - Tab 2\r\nI/TiAPI (10262): **************> win2 blur event fired! - win 2\r\nI/TiAPI (10262): -------------> tab1 focus event fired! - Tab 1\r\nI/TiAPI (10262): -------------> tabGroup focus event fired! - Tab 1\r\nI/TiAPI (10262): -------------> win1 focus event fired! - win 1\r\n\r\n", "attachment": [ { "id": "28746", "filename": "2.0.2 tabgrouplogging.rtf", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-27T00:28:25.000+0000", "size": 1262, "mimeType": "text/rtf" }, { "id": "28747", "filename": "2.1.0 tabgroupLogging.rtf", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-27T00:28:25.000+0000", "size": 1257, "mimeType": "text/rtf" } ], "flagged": false, "summary": "Android:Tabgroup:Focus event for a tab is showing wrong source name.", "creator": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Tested with Titanium SDK: 2.1.0.v20120625134154\r\nTested with Titanium  Studio: 2.1.0.201206221045\r\nDevice - Android 2.2.2 LG-P970,Samsung Galaxy Nexus Android 4.0.2\r\nMachine OS - MAC 10.7.3", "comment": { "comments": [ { "id": "200558", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified on additional devices that this is a regression from 2.0.2.\r\n\r\nTo help clarify a tiny bit, switching to tab 2 gives:\r\nI/TiAPI ( 3005): **************> win1 blur event fired! - win 1\r\nI/TiAPI ( 3005): -------------> win2 focus event fired! - win 2\r\nI/TiAPI ( 3005): **************> tab1 blur event fired! - Tab 1\r\nI/TiAPI ( 3005): -------------> tab2 focus event fired! - Tab 1\r\nI/TiAPI ( 3005): -------------> tabGroup focus event fired! - Tab 1\r\n\r\nThe last two lines should read \"TAB 2\" \r\n\r\n...and switching back to tab 1:\r\nI/TiAPI ( 3005): **************> win2 blur event fired! - win 2\r\nI/TiAPI ( 3005): -------------> win1 focus event fired! - win 1\r\nI/TiAPI ( 3005): **************> tab2 blur event fired! - Tab 2\r\nI/TiAPI ( 3005): -------------> tab1 focus event fired! - Tab 2\r\nI/TiAPI ( 3005): -------------> tabGroup focus event fired! - Tab 2\r\n\r\nThe last two lines should read \"TAB 1\"", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-27T10:07:31.000+0000", "updated": "2012-06-27T10:07:31.000+0000" }, { "id": "200644", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Created [PR #2481|https://github.com/appcelerator/titanium_mobile/pull/2481] to resolve this issue in master.\r\nA backport to 2_1_X will follow shortly once this PR is approved.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-27T13:26:19.000+0000", "updated": "2012-06-27T13:26:19.000+0000" }, { "id": "200655", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Created [PR #2483|https://github.com/appcelerator/titanium_mobile/pull/2483] to backport fix into 2_1_X.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-27T13:56:05.000+0000", "updated": "2012-06-27T13:56:05.000+0000" }, { "id": "200687", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fix with:\r\n\r\nTitanium Studio, build: 2.1.0.201206251749\r\nTitanium SDK: 2.1.0.v20120627151616\r\nLG VS910 4G\r\nAndroid version 2.3.6", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-27T16:21:20.000+0000", "updated": "2012-06-27T16:21:20.000+0000" }, { "id": "283458", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/5074\n", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-10T05:57:12.000+0000", "updated": "2013-12-10T05:57:12.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }