{ "id": "84195", "key": "TIMOB-6844", "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": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12091", "description": "", "name": "Sprint 2011-51", "archived": true, "released": true, "releaseDate": "2011-12-26" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-03-11T18:12:15.000+0000", "created": "2011-12-22T02:59:37.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "regression", "verified-1.8.0.1" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:44:40.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\nWindows in tabgroup do not get any event anymore. Specifically the android:back is not caught.\r\n\r\nThe same code works as expected on 1.7.5 (same device)\r\n\r\nh2. Test case\r\n\r\nHere is a sample app.js to reproduce :\r\n\r\n{code:lang=javascript}\r\n var win1 =Ti.UI.createWindow({\r\n backgroundColor: '#FFFFFF',\r\n title: 'Win1',\r\n fullscreen: false,\r\n navBarHidden: true\r\n});\r\n\r\nvar tab1 = Ti.UI.createTab({\r\n title: 'Tab1',\r\n window: win1\r\n});\r\n\r\nvar win2 =Ti.UI.createWindow({\r\n backgroundColor: '#000000',\r\n title: 'Win2',\r\n fullscreen: false,\r\n navBarHidden: true\r\n});\r\nvar tab2 = Ti.UI.createTab({\r\n title: 'Tab2',\r\n window: win2\r\n});\r\n\r\nvar tabGroup = Ti.UI.createTabGroup();\r\n\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\n\r\ntabGroup.open();\r\n\r\nwin1.addEventListener('android:back', function(){\r\n Ti.API.info('Win 1 caught android:back');\r\n});\r\n\r\nwin2.addEventListener('android:back', function(){\r\n Ti.API.info('Win 2 caught android:back');\r\n});\r\n\r\nwin1.addEventListener('android:search', function(){\r\n Ti.API.info('Win 1 caught android:search');\r\n});\r\n\r\nwin1.addEventListener('android:voldown', function(){\r\n Ti.API.info('Win 1 caught android:voldown');\r\n});\r\n{code}\r\n\r\nNote that for standard heavyweight windows (without the tabgroup), it works *as expected* on both 1.8.0.1 and 1.7.5:\r\n\r\n{code:lang=javascript}\r\nvar win1 =Ti.UI.createWindow({\r\n backgroundColor: '#FFFFFF',\r\n title: 'Win1',\r\n fullscreen: false,\r\n navBarHidden: true\r\n});\r\n\r\nwin1.open();\r\n\r\nwin1.addEventListener('android:back', function(){\r\n Ti.API.info('Win 1 caught android:back');\r\n});\r\n\r\nwin1.addEventListener('android:search', function(){\r\n Ti.API.info('Win 1 caught android:search');\r\n});\r\n\r\nwin1.addEventListener('android:voldown', function(){\r\n Ti.API.info('Win 1 caught android:voldown');\r\n});\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: UI - hardware button events not fired for heavyweight windows in tabGroups", "creator": { "name": "dpalita", "key": "dpalita", "displayName": "David Palita", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dpalita", "key": "dpalita", "displayName": "David Palita", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "* Titanium Mobile 1.8.0.1.RC3\r\n* android 2.3.5\r\n* device HTC desire HD (Ace)\r\n* using v8 or rhino : same result", "comment": { "comments": [ { "id": "176995", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "\"TabGroup\" component does not support \"android:back\", could be useful to have that event supported because then we wouldn't have to add \"android:back\" event to every window in tab group.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2011-12-22T03:21:11.000+0000", "updated": "2011-12-22T03:21:11.000+0000" }, { "id": "177031", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "I have tested this and can confirm that it works as expected in 1.7.5 but not in 1.8.0.1 RC3.\r\n\r\nA standard heavyweight window works as expected for both versions.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-22T10:30:07.000+0000", "updated": "2011-12-22T10:30:07.000+0000" }, { "id": "177032", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "David\r\n\r\nThanks for the ticket. Please note the changes I made, to bring it in line with the [JIRA Ticket Checklist|https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist].\r\n\r\nCheers", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-22T10:33:19.000+0000", "updated": "2011-12-22T10:33:19.000+0000" }, { "id": "177035", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Bug is still persistant on:\r\n\r\nSDK build: 1.8.0.1.v20111221194633\r\nRuntime: V8, Rhino\r\nTitanium Studio, build: 1.0.7.201112152014\r\nDevice: Nexus S (2.3.6)\r\n\r\nNote: Was not able to reproduce bug in 1.7.5 on Nexus S (2.3.6). And, the standard heavyweight windows code works as expected on 1.8.0.1.v20111221194633 (V8/Rhino) on Nexus S (2.3.6).", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-12-22T11:05:36.000+0000", "updated": "2011-12-22T11:05:36.000+0000" }, { "id": "177062", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fix on: \r\n\r\nSDK build: 1.8.0.1.v20111222130907\r\nRuntime: V8, Rhino\r\nTitanium Studio, build: 1.0.7.201112152014\r\nDevice: Nexus S (2.3.6)\r\n\r\nNote: \r\n* The heavyweight windows code still works as expected on 1.8.0.1.v20111222130907\r\n* Will not close bug until verified in 1.9.0", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-12-22T13:46:21.000+0000", "updated": "2011-12-22T13:47:22.000+0000" }, { "id": "177095", "author": { "name": "dpalita", "key": "dpalita", "displayName": "David Palita", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for the incredibly fast fix, you guys are amazing.\r\nSorry about the initial ticket formatting, I wasn't aware of your JIRA checklist... I'll comply with it in the future.\r\nHappy holidays !", "updateAuthor": { "name": "dpalita", "key": "dpalita", "displayName": "David Palita", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-23T01:00:49.000+0000", "updated": "2011-12-23T01:00:49.000+0000" }, { "id": "177538", "author": { "name": "fidojones", "key": "fidojones", "displayName": "Lorenzo", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm continue experimenting same problem with nightly build\r\n\r\nSDK build: 1.9.0.v20111228180134\r\nRuntime: V8, Rhino\r\nTitanium Studio, build: 1.0.7.201112152014\r\n\r\nMy first window is a modal window with four buttons. If I open a normal window and go back, android:back button works fine. If I open a tabgroup window and go back, android:back button doesn't work and say me \"dialog activity is destroyed, unable to show dialog with message\". So If I open a tabgroup window and go back, previous activity is destroyed. \r\n\r\nI have no problem with 1.7.5.", "updateAuthor": { "name": "fidojones", "key": "fidojones", "displayName": "Lorenzo", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-29T04:00:04.000+0000", "updated": "2011-12-29T04:00:04.000+0000" }, { "id": "177647", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Lorenzo,\r\n\r\nCould you please provide an app.js and reproducible steps on the problem you are seeing? I've created a model window that opens a tab group, and back works fine for me.\r\n\r\nThanks,\r\nAllen", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-29T15:19:37.000+0000", "updated": "2011-12-29T15:19:37.000+0000" }, { "id": "177687", "author": { "name": "fidojones", "key": "fidojones", "displayName": "Lorenzo", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ok, here is a simple code of error doing a android:back event after open a tabgroup (fails with 1.8.0.1, and 1.9, works fine with 1.7.5 and early versions of 1.8.0):\r\n\r\n{code:title=app.js}\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nvar main_win = Titanium.UI.createWindow({ \r\n title:\"test\",\r\n backgroundColor:'#FFF',\r\n modal: true,\r\n exitOnClose: true\r\n});\r\n\r\nmain_win.addEventListener('android:back', function(e) {\r\n\tvar msg_pregunta = Titanium.UI.createAlertDialog({\r\n\t\ttitle:\"Quit\",\r\n\t\tmessage:\"Do yo want to quit?\"\r\n\t});\r\n\tmsg_pregunta.buttonNames = ['OK','Cancelar'];\r\n\r\n\tmsg_pregunta.addEventListener('click', function(e) {\r\n\t\tif(e.index==0){\r\n\t\t\tmain_win.close();\r\n\t\t}\r\n\t});\r\n\tmsg_pregunta.show();\r\n});\r\n\r\nvar btn_asterisk = Titanium.UI.createButton({\r\n title:'Asterisk',\r\n height:Ti.Platform.displayCaps.platformHeight * 0.22,\r\n width:Ti.Platform.displayCaps.platformWidth * 0.35,\r\n left:Ti.Platform.displayCaps.platformWidth * 0.10,\r\n top:Ti.Platform.displayCaps.platformHeight * 0.58,\r\n});\r\n\r\nbtn_asterisk.addEventListener('click', function(){\r\n\tTitanium.include('app_asterisk.js');\r\n});\r\n\r\nmain_win.add(btn_asterisk);\r\n\r\nmain_win.open();\r\n{code}\r\n\r\n{code:title=app_asterisk.js}\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\nvar win_llamadas = Titanium.UI.createWindow({ \r\n title:'Calls',\r\n backgroundColor:'#000',\r\n});\r\nvar tab1 = Titanium.UI.createTab({ \r\n icon:'images/KS_nav_views.png',\r\n title:'Calls',\r\n window:win_llamadas\r\n});\r\n\r\nvar win_buzon = Titanium.UI.createWindow({ \r\n title:'Inbox',\r\n backgroundColor:'#000',\r\n});\r\nvar tab2 = Titanium.UI.createTab({ \r\n icon:'images/KS_nav_ui.png',\r\n title:'Inbox',\r\n window:win_buzon\r\n});\r\n\r\nvar win_listanegra = Titanium.UI.createWindow({ \r\n title:'Black list',\r\n backgroundColor:'#000',\r\n});\r\n\r\nvar tab3 = Titanium.UI.createTab({ \r\n icon:'images/KS_nav_ui.png',\r\n title:'Black list',\r\n window:win_listanegra\r\n});\r\n\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\ntabGroup.addTab(tab3);\r\n\r\ntabGroup.open();\r\n{code}", "updateAuthor": { "name": "fidojones", "key": "fidojones", "displayName": "Lorenzo", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-30T00:50:33.000+0000", "updated": "2011-12-30T00:51:29.000+0000" }, { "id": "178951", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing bug. Already verified in 1.8.0.1.", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-01-11T15:22:12.000+0000", "updated": "2012-01-11T15:22:12.000+0000" }, { "id": "181311", "author": { "name": "fidojones", "key": "fidojones", "displayName": "Lorenzo", "active": true, "timeZone": "America/Los_Angeles" }, "body": "In 1.8.1 version itsn't fixed. Same problem. If you open a heavyweight window after a normal window. Android back event itn's fired. Refer to my example in the third post up.", "updateAuthor": { "name": "fidojones", "key": "fidojones", "displayName": "Lorenzo", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-01T02:21:20.000+0000", "updated": "2012-02-01T02:21:20.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }