{ "id": "101618", "key": "TIMOB-11031", "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": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14157", "description": "Sprint 2012-20 API", "name": "Sprint 2012-20 API", "archived": true, "released": true, "releaseDate": "2012-10-08" }, { "id": "14272", "description": "2012 Sprint 20", "name": "2012 Sprint 20", "archived": true, "released": true, "releaseDate": "2012-10-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-10-09T02:14:49.000+0000", "created": "2012-09-20T16:06:53.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "api", "module_tabgroup", "qe-testadded", "regression" ], "versions": [], "issuelinks": [ { "id": "29494", "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 } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-07-16T10:21:34.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": "When running an app with a tab group, with a click event listener registered on one of the windows in the tab group, the click event is never generated.\r\n\r\nThis is a regression--the code works fine on 2.1.2.GA but fails on master (3.0).\r\n\r\n{code}\r\n\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n \r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n \r\n \r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({  \r\n    title:'Tab 1',\r\n    backgroundColor:'#fff'\r\n});\r\n \r\nwin1.addEventListener('open', function(){\r\n    alert('win1 open event fired');\r\n});\r\n\r\nwin1.addEventListener('click', function(e) {\r\n\talert('win1 clicked!');\r\n});\r\n \r\nvar tab1 = Titanium.UI.createTab({  \r\n    icon:'KS_nav_views.png',\r\n    title:'Tab 1',\r\n    window:win1\r\n});\r\n \r\nvar label1 = Titanium.UI.createLabel({\r\n    color:'#999',\r\n    text:'I am Window 1',\r\n    font:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n    textAlign:'center',\r\n    width:'auto'\r\n});\r\n \r\nwin1.add(label1);\r\n \r\n//\r\n// create controls tab and root window\r\n//\r\nvar win2 = Titanium.UI.createWindow({  \r\n    title:'Tab 2',\r\n    backgroundColor:'#fff'\r\n});\r\n \r\nwin2.addEventListener('open', function(){\r\n    alert('win2 open event fired');\r\n});\r\n \r\nvar tab2 = Titanium.UI.createTab({  \r\n    icon:'KS_nav_ui.png',\r\n    title:'Tab 2',\r\n    window:win2\r\n});\r\n \r\nvar label2 = Titanium.UI.createLabel({\r\n    color:'#999',\r\n    text:'I am Window 2',\r\n    font:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n    textAlign:'center',\r\n    width:'auto'\r\n});\r\n \r\nwin2.add(label2);\r\n \r\n \r\n \r\n//\r\n//  add tabs\r\n//\r\ntabGroup.addTab(tab1);  \r\ntabGroup.addTab(tab2);  \r\n \r\n \r\n// open tab group\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Window in tab group fails to register click events", "creator": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "222402", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{code}\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\nTitanium.UI.setBackgroundColor('#000');\n \n// create tab group\nvar tabGroup = Titanium.UI.createTabGroup();\n \n \n//\n// create base UI tab and root window\n//\nvar win1 = Titanium.UI.createWindow({ \n title:'Tab 1',\n backgroundColor:'#fff'\n});\n \nwin1.addEventListener('open', function(){\n Ti.API.info('win1 open event fired');\n});\n \nwin1.addEventListener('click', function(e) {\n Ti.API.info('win1 clicked');\n});\n\nwin1.addEventListener('close', function(e) {\n\tTi.API.info('win1 closed');\n});\n\nvar tab1 = Titanium.UI.createTab({ \n icon:'KS_nav_views.png',\n title:'Tab 1',\n window:win1\n});\n \nvar label1 = Titanium.UI.createLabel({\n color:'#999',\n text:'I am Window 1',\n font:{fontSize:20,fontFamily:'Helvetica Neue'},\n textAlign:'center',\n width:'auto'\n});\n \nwin1.add(label1);\n//win1.open();\n \n//\n// create controls tab and root window\n//\nvar win2 = Titanium.UI.createWindow({ \n title:'Tab 2',\n backgroundColor:'#fff'\n});\n \nwin2.addEventListener('open', function(){\n alert('win2 open event fired');\n});\n \nvar tab2 = Titanium.UI.createTab({ \n icon:'KS_nav_ui.png',\n title:'Tab 2',\n window:win2\n});\n \nvar label2 = Titanium.UI.createLabel({\n color:'#999',\n text:'I am Window 2',\n font:{fontSize:20,fontFamily:'Helvetica Neue'},\n textAlign:'center',\n width:'auto'\n});\n \nwin2.add(label2);\n \nwin2.addEventListener('click', function(e) {\n Ti.API.info('win2 clicked');\n});\n \n \n//\n// add tabs\n//\ntabGroup.addTab(tab1); \ntabGroup.addTab(tab2); \n\ntabGroup.addEventListener('open', function(e) {\n Ti.API.info('tabGroup opened');\n});\n\ntabGroup.addEventListener('close', function(e) {\n Ti.API.info('tabGroup closed');\n});\n\ntabGroup.addEventListener('click', function(e) {\n\tTi.API.info('tabGroup clicked');\n});\ntabGroup.open();\n\n{code}", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-06T21:48:48.000+0000", "updated": "2012-10-06T21:48:48.000+0000" }, { "id": "222677", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/3134", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-09T02:04:58.000+0000", "updated": "2012-10-09T02:04:58.000+0000" }, { "id": "224902", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with:\r\nSDK:3.0.0.v20121024144610\r\nStudio: 3.0.0.201210220122\r\nDevice:HTC Desire V(Android 4.0.3)\r\n\r\nClick events are registered successfully on Window in tab Group.", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-25T09:35:51.000+0000", "updated": "2012-10-25T09:35:51.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }