{ "id": "99668", "key": "TIMOB-10576", "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": [], "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-09-05T15:18:51.000+0000", "created": "2012-08-23T12:45:53.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api" ], "versions": [ { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" } ], "issuelinks": [], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T22:17:17.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": "h2. Expected results\r\n\r\nAn animation on one component shouldn't affect another.\r\n\r\nh2. Actual results\r\n\r\nDrop the following code into a new project and build for iOS. Click the second box to transition between its children. Then, click the first box. You'll see the \"transition\" box swap back to its original child. If you click it again, it will transition to the second child. So it's not that the transition has actually been fired by the click on the top box. It's more like the zIndex of the child elements has been swapped.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor:'#fff'\r\n});\r\nwin.add(Ti.UI.createLabel({\r\n\ttext:'Click transition box, then fade box',\r\n\tcolor:'#000',\r\n\tfont:{\r\n\t\tfontSize:20,\r\n\t\tfontWeight:'bold'\r\n\t},\r\n\theight:'auto',\r\n\twidth:'auto',\r\n\ttop:10\r\n}));\r\nvar box = function(color, whatsItDo) {\r\n\t// helper function for making colored boxes\r\n\tvar bx = Ti.UI.createView({\r\n\t\theight:50,\r\n\t\twidth:100,\r\n\t\tbackgroundColor:color\r\n\t});\r\n\tbx.add(Ti.UI.createLabel({\r\n\t\theight:'auto',\r\n\t\twidth:'auto',\r\n\t\ttext: whatsItDo,\r\n\t\tcolor:'#fff',\r\n\t\tfont:{\r\n\t\t\tfontWeight:'bold'\r\n\t\t}\r\n\t}));\r\n\treturn bx;\r\n};\r\n\r\n// add some boxes\r\nvar box1 = box('red', 'fade out/in'),\r\n\tbox2 = box('green', 'transition'),\r\n\tbox3 = box('blue', 'transition'),\r\n\tselectedIndex = 0;\r\nbox1.top = 50;\r\nwin.add(box1);\r\n\r\n// this container holds the two boxes you'll transition between\r\nvar container = Ti.UI.createView({\r\n\twidth:'auto',\r\n\theight: 70,\r\n\ttop: 120\r\n});\r\ncontainer.add(box2);\r\ncontainer.add(box3);\r\nwin.add(container);\r\n\r\n// event listener to fade out/in box 1\r\nbox1.addEventListener('click', function(){\r\n\tbox1.animate({\r\n\t\topacity:0,\r\n\t\tduration:2000\r\n\t}, function(){\r\n\t\tbox1.animate({\r\n\t\t\topacity:1,\r\n\t\t\tduration:2000\r\n\t\t});\r\n\t});\r\n});\r\n\r\n// event listener for transition effect\r\ncontainer.addEventListener('click', function(){\r\n\tif (selectedIndex%2 == 0) {\r\n\t\tcontainer.animate({\r\n\t\t\tview:box2,\r\n\t\t\ttransition:Ti.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT\r\n\t\t});\r\n\t}\r\n\telse {\r\n\t\tcontainer.animate({\r\n\t\t\tview:box3,\r\n\t\t\ttransition:Ti.UI.iPhone.AnimationStyle.FLIP_FROM_RIGHT\r\n\t\t});\r\n\t}\r\n\tselectedIndex++;\r\n});\r\n\r\nwin.open()\r\n\r\n{code}\r\n\r\n\r\nCode is a simplified version of one of the demos we do in training. See https://github.com/appcelerator-training/tcmd-code/tree/master/Finished_code/Lab340\r\n", "attachment": [], "flagged": false, "summary": "iOS: animation causes transitioned element to swap children's order", "creator": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "217707", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cannot be reproduced on master but can reproduce it on 2_1_X branch. Could be because of the change we made to the animation code (as part of moving it into BLOCK based code) on master. Marking ticket as invalid. ", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-05T15:18:22.000+0000", "updated": "2012-09-05T15:18:22.000+0000" }, { "id": "217710", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested on OSX 10.7.4\r\nXcode Version 4.4 (4F250)\r\niOS Sim 5.0 and 4.3\r\ngit hash 2.2.0 (b782790d0487f6f75e9e098aff07bb3d46bd311c)from Sept 04,2012", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-05T15:24:56.000+0000", "updated": "2012-09-05T15:24:56.000+0000" }, { "id": "410795", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T22:17:17.000+0000", "updated": "2017-03-09T22:17:17.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }