{ "id": "88006", "key": "TIMOB-8030", "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": "13207", "name": "Sprint 2012-07", "archived": true, "released": true, "releaseDate": "2012-04-08" }, { "id": "13270", "description": "Release 1.8 Service Pack 3 (CI for 1_8_X)", "name": "Release 1.8.3", "archived": true, "released": false } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-09T02:21:08.000+0000", "created": "2012-03-15T10:05:09.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "module_window", "qe-testadded" ], "versions": [ { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2013-12-10T06:19:32.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": "When properties or animations are set to the window as follows: (See the comments in the code below)\r\n\r\n{noformat}\r\n\r\nvar appWin = Ti.UI.createWindow({\r\n width: '100%',\r\n height: '100%',\r\n backgroundColor: 'white'\r\n});\r\nvar btn = Ti.UI.createButton({\r\n top: 0,\r\n left: 0,\r\n width: 100,\r\n height: 50,\r\n title: 'bug'\r\n});\r\nbtn.addEventListener('click', demoBug);\r\nappWin.add(btn);\r\nappWin.open();\r\n\r\nfunction demoBug() {\r\n var win = Ti.UI.createWindow({\r\n top: Ti.Platform.displayCaps.platformHeight,\r\n right: 0,\r\n bottom: -Ti.Platform.displayCaps.platformHeight,\r\n left: 0,\r\n backgroundColor: 'red',\r\n });\r\n\r\n var num = 0;\r\n win.addEventListener('open', function() {\r\n Ti.API.error('win:open:' + (++num));\r\n alert('open called');\r\n })\r\n\r\n // These 2 lines are the cause of the bug. Remove either one or both, the\r\n // bug doesn't manifest.\r\n win.top = 50;\r\n win.bottom = 50;\r\n // win.duration = 0;\r\n // win.open();\r\n win.open({\r\n top: 50,\r\n bottom: 50\r\n //duration: 0\r\n });\r\n}\r\n\r\n{noformat}\r\n\r\n\r\n\r\n\r\n*ACTUAL BEHAVIOR*\r\n\r\nThe open gets fired twice (can be confirmed by the alert statement). If the properties are set just once (either inside the open function or separately), the open event gets fired just once.\r\n\r\n*EXPECTED BEHAVIOR* \r\n\r\nOpen should be fired just once.\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: Window's \"open\" event fires twice when animating or properties are set", "creator": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium SDK: 1.8.2\r\nPlatform SDK: iOS 5.0", "comment": { "comments": [ { "id": "187995", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending #1798", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-22T10:01:56.000+0000", "updated": "2012-03-22T10:01:56.000+0000" }, { "id": "194410", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 2.0.2.v20120505151714 with iPhone 4 5.0.1", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-10T11:25:15.000+0000", "updated": "2012-05-10T11:25:15.000+0000" }, { "id": "202052", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Reopening to update labels.", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-07-09T02:19:45.000+0000", "updated": "2012-07-09T02:19:45.000+0000" }, { "id": "283502", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4967\n", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-10T06:19:32.000+0000", "updated": "2013-12-10T06:19:32.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }