{ "id": "76419", "key": "TIMOB-4416", "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": "11360", "description": "Mobile 1.8.0 M07", "name": "Sprint 2011-28", "archived": true, "released": true, "releaseDate": "2011-07-18" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-10-27T14:52:26.000+0000", "created": "2011-06-15T09:19:03.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" } ], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-10-27T14:52:33.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": "h1. Problem\r\nClosing a nav group causes the open window's JavaScript to be interpreted and run again, as if it were being opened for the first time.\r\n\r\nh2. Reproduction\r\nDrop the following in an app.js win1.js and win2.js, respectively.\r\n- When you run it, \"win1\" (a nav group) will be opened\r\n- You'll see an alert (\"Win 1 Opened!\").\r\n- After 1 second, win1 will be closed and win2 will be opened.\r\n- You'll see an alert (\"Win 2 Opened!\") followed by another (\"Win 1 Opened!\").\r\n{code:title=app.js}\r\nvar win1 = Ti.UI.createWindow();\r\nwin1.add(Titanium.UI.iPhone.createNavigationGroup({\r\n window: Titanium.UI.createWindow({\r\n navBarHidden: true,\r\n backgroundColor: '#f00',\r\n url: 'win1.js'\r\n })\r\n}));\r\n\r\nvar win2 = Titanium.UI.createWindow({\r\n backgroundColor: '#0f0',\r\n url: 'win2.js'\r\n});\r\n\r\nwin1.open();\r\n\r\nsetTimeout(function() {\r\n win2.open({transition:Titanium.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT});\r\n win1.close();\r\n}, 1000);\r\n{code}\r\n{code:title=win1.js}\r\nalert('Win 1 Opened!');\r\n{code}\r\n{code:title=win2.js}\r\nalert('Win 2 Opened!');\r\n{code}\r\n\r\nh2. Workaround\r\nThis isn't really a workaround, but if you do not close the nav group, this bug won't show up. Hide it instead (call win1.hide() instead of win1.close() and the bug will go away).\r\n\r\nh3. Associated Helpdesk Ticket\r\nhttp://appc.me/c/APP-422396", "attachment": [], "flagged": false, "summary": "iOS: Closing a Nav Group Interprets Window's JS Again", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": "Tested in iPhone Simulator 4.3\r\nBROKEN in Ti Mobile 1.7.0 (official release)\r\nBROKEN in Ti Mobile 1.7.0 RC1\r\nBROKEN in Ti Mobile 1.8.0 (06/14/11 14:46 108ce42...)\r\nWORKS in Ti Mobile 1.6.2", "comment": { "comments": [ { "id": "164388", "author": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Passed as expected on:\niPad 3rd Gen 4.0.2\niPad 2 4.3.2\niPhone 4 4.2.10\n\nSDK:\nversion=1.8.0\ntimestamp=08/26/11 14:53\ngithash=8e978eb...\n", "updateAuthor": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-29T13:00:21.000+0000", "updated": "2011-08-29T13:00:21.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }