{ "id": "101612", "key": "TIMOB-11028", "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": "14168", "description": "2012 Sprint 22 API", "name": "2012 Sprint 22 API", "archived": true, "released": true, "releaseDate": "2012-11-05" }, { "id": "14274", "description": "2012 Sprint 22", "name": "2012 Sprint 22", "archived": true, "released": true, "releaseDate": "2012-11-05" } ], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2012-10-29T22:41:26.000+0000", "created": "2012-09-20T15:43:36.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "regression" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-11-07T18:36:00.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": "Using the sample code from TIMOB-8192, it appears that the open event fires (and an alert shows) when building the app with targetSdkVersion unset, but with targetSdkVersion set to 11 or higher, the open event never fires.\r\n\r\n\r\n{code}\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\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\ntabGroup.open();\r\n{code}\r\n\r\nWhen the following code is added to the tiapp.xml file and the app is run on a 4.0.3 emulator, the open even doesn't fire.\r\n\r\n{code}\r\n \r\n \t14\r\n \t\r\n \t\t\r\n \t\r\n \r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Window.open event fails to fire for windows in ActionBar tab groups", "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": "220025", "author": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Not sure if the manifest.xml change is required at all... This appears to show up with Ti SDK 3.0 against the Android 2.2 Emulator, as well, but does not show up (with identical code) running Ti SDK against the 2.2 emulator... May be a straight regression. Have already tested this so many different ways my eyes are crossing.", "updateAuthor": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-20T15:53:39.000+0000", "updated": "2012-09-20T15:53:39.000+0000" }, { "id": "225441", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This should be fixed in both master and 3.0.X. Closing as unable to reproduce.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-29T22:40:58.000+0000", "updated": "2012-10-29T22:40:58.000+0000" }, { "id": "251258", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Window.open event is firing up.Cannot reproduce it.So closing the bug.\r\nEnvironment used for verification\r\nSDK - 3.0.0.GA , 3.1.0.GA\r\nAppcelerator Studio : 3.1.1.201305072102\r\nDevices : Samsung GALAXY Note Android 2.3.6 and Samsung Galaxy Nexus Android 4.0.2", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-10T08:31:44.000+0000", "updated": "2013-05-10T08:31:44.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }