{ "id": "89711", "key": "TIMOB-8628", "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": "13273", "description": "Release 2.0.2", "name": "Release 2.0.2", "archived": false, "released": true, "releaseDate": "2012-05-31" }, { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13405", "description": "Sprint 2012-09 API", "name": "Sprint 2012-09 API", "archived": true, "released": true, "releaseDate": "2012-05-06" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-10T03:07:02.000+0000", "created": "2012-04-09T12:25:44.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "module_navgroup", "qe-testadded", "titanbeta" ], "versions": [], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-10T15:57:13.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h4.Problem Summary\r\nWhen running a Titanium app in iOS 4.3, the focus event of a window that presents an AlertDialog doesn't fire when returning to that window.\r\n\r\nh4.Problem Details\r\n1. Window 1 presents an AlertDialog.\r\n2. Clicking a button on the AlertDialog opens Window 2 via NavigationGroup.\r\n3. When Window 2 is closed via the native Back button, Window 1's focus event does not fire.\r\n\r\nh6.Works fine in iOS 5.0\r\nh6.Broken in iOS 4.3\r\n\r\n- Works if the second window is not launched from an AlertDialog's click event (for example, if you replaced the AlertDialog with a simple button on the window).\r\n\r\nh4.Testcase\r\n1. Put the following code into a new project.\r\n2. Run the app using the iOS 4.3 simulator.\r\n3. Notice that the \"main\" window's focus event fires.\r\n4. When the AlertDialog comes up, click OK.\r\n5. When the second window appears, click Back.\r\n6. Notice that the \"main\" window's focus event *does not fire*...this is the problem.\r\n\r\napp.js\r\n{code}\r\nvar win1 = Ti.UI.createWindow({url:'main.js',\r\n navBarHidden:false});\r\n\r\nTi.App.NavGroup = Ti.UI.iPhone.createNavigationGroup({window:win1});\r\nvar NavBase = Ti.UI.createWindow();\r\nNavBase.add(Ti.App.NavGroup);\r\nNavBase.open(); // this opens win1 automatically\r\n{code}\r\n\r\nmain.js\r\n{code}\r\nMainWin = Ti.UI.currentWindow;\r\nMainWin.addEventListener('focus', OnFocus);\r\n\r\nfunction OnFocus(evt)\r\n{\r\n Ti.API.info('Focus Event fired');\r\n\r\n var MessageDialog=Ti.UI.createAlertDialog({\r\n message:'Press OK to open a new window and then press the back button to see me again',\r\n buttonNames:['Ok'],\r\n });\r\n MessageDialog.addEventListener('click',DoClick);\r\n\r\n MessageDialog.show();\r\n}\r\n\r\nfunction DoClick(evt)\r\n{\r\n var MainWin = Ti.UI.createWindow({url:'test.js',\r\n layout:'vertical',\r\n navbarHidden: false});\r\n Ti.App.NavGroup.open(MainWin);\r\n}\r\n{code}\r\n\r\ntest.js\r\n{code}\r\nTestWin = Ti.UI.currentWindow;\r\n\r\nvar MyLabel = Ti.UI.createLabel({text: 'Click the back button', color:'white'});\r\n\r\nTestWin.add(MyLabel);\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS: focus event doesn't fire when AlertDialog click event opens new window using NavigationGroup, and then you go \"back\"", "creator": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "environment": "- Titanium SDK 2.0.0.v20120325213306\r\n- Titanium Studio 1.0.9.201202141208\r\n- iOS 4.3 (simulator and iPhone)\r\n- Mac OSX 10.7.2\r\n", "comment": { "comments": [ { "id": "192089", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "HD ticket: http://support.appcelerator.com/tickets/APP-277754", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-04-20T13:28:51.000+0000", "updated": "2012-04-20T13:28:51.000+0000" }, { "id": "192090", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "Also a problem in SDK 2.1.0.v20120416160358.", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-04-20T13:29:41.000+0000", "updated": "2012-04-20T13:29:41.000+0000" }, { "id": "192763", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving out of core.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-26T10:19:18.000+0000", "updated": "2012-04-26T10:19:18.000+0000" }, { "id": "192981", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Same root issue as the one reported in TIMOB-8559", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-04-27T12:04:16.000+0000", "updated": "2012-04-27T12:04:16.000+0000" }, { "id": "192986", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending https://github.com/appcelerator/titanium_mobile/pull/2090", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-04-27T12:19:12.000+0000", "updated": "2012-04-27T12:19:12.000+0000" }, { "id": "194424", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 2.0.2.v20120505151714 on iphone 4 4.3.5 and simulator 4.3", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-10T13:16:20.000+0000", "updated": "2012-05-10T13:16:20.000+0000" }, { "id": "201319", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "Verified fixed in SDK 2.1.0.GA.", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-07-03T05:51:17.000+0000", "updated": "2012-07-03T05:51:17.000+0000" }, { "id": "202311", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening to update labels.", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-10T03:06:20.000+0000", "updated": "2012-07-10T03:06:20.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }