{ "id": "138565", "key": "TIMOB-17923", "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": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" }, { "id": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-11-24T23:57:13.000+0000", "created": "2014-10-27T14:00:13.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "horizontal", "layout", "regression", "vertical" ], "versions": [], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-12-01T22:05: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": "A few weeks ago I started noticing that a lot of apps where I used complex {{horizontal}} and {{vertical}} layouts were showing their children before they were layed out. I made a simple test case that showed this has been the case since 3.3.0 and is not related to iOS 8 which I first assumed.\r\n\r\n*NOTE:* In some occasions I've (as well as Jason) have seen the children not being layed out at all!\r\n\r\nh2. Test case\r\nRun the following test case again Titanium 3.3.0.GA or later:\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\n\r\nwin.add(Ti.UI.createLabel({\r\n text: 'Click'\r\n}));\r\n\r\nwin.addEventListener('click', function(e) {\r\n\r\n var win = Ti.UI.createWindow({\r\n backgroundColor: 'red',\r\n layout: 'vertical',\r\n });\r\n\r\n win.addEventListener('click', function(e) {\r\n win.close();\r\n });\r\n\r\n for (var i = 0; i < 500; i++) {\r\n win.add(Ti.UI.createLabel({\r\n top: (i === 0) ? 20 : 0,\r\n color: 'white',\r\n text: 'Line #' + (i + 1)\r\n }));\r\n }\r\n\r\n win.open();\r\n\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\nh2. Attached videos\r\nThe movies I recorded show clearly that the children show center-top (except the first label which has {{top:20}} before being layed out at their proper place.\r\n\r\nBefore Titanium 3.3.x the children views didn't show up until they were layed out, which of course looks better.\r\n\r\n- {{323-710.mov}} Titanium 3.2.3 & iOS 7.1 (vertical) (/)\r\n- {{330-710.mov}} Titanium 3.3.0 & iOS 7.1 (vertical) (x)\r\n- {{330-710-horizontal.mov}} Titanium 3.3.0 & iOS 7.1 (horizontal) (x)\r\n- {{340-810.mov}} Titanium 3.4.0 & iOS 8.1 (vertical) (x)\r\n", "attachment": [ { "id": "52183", "filename": "323-710.mov", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-10-27T14:00:13.000+0000", "size": 249271, "mimeType": "video/quicktime" }, { "id": "52184", "filename": "330-710.mov", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-10-27T14:00:13.000+0000", "size": 393144, "mimeType": "video/quicktime" }, { "id": "52185", "filename": "330-710-horizontal.mov", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-10-27T14:00:13.000+0000", "size": 507790, "mimeType": "video/quicktime" }, { "id": "52186", "filename": "340-810.mov", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-10-27T14:00:13.000+0000", "size": 574757, "mimeType": "video/quicktime" } ], "flagged": false, "summary": "iOS: Complex non-composite layouts show before lay-out since 3.3.0", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "Titanium 3.2.3.GA (works)\r\nTitanium 3.3.0.GA & 3.4.0.GA (fails)\r\niOS version is not relevant\r\nTarget simulator or device is not relevant", "closedSprints": [ { "id": 258, "state": "closed", "name": "2014 Sprint 24 SDK", "startDate": "2014-11-24T22:28:25.425Z", "endDate": "2014-12-06T01:00:00.000Z", "completeDate": "2014-12-08T17:21:15.171Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "329731", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Workaround is to set window's content visible property to false prior to window opening and then in window \"open\" event listener set it back to true.\r\n\r\n\r\nIt looks ok, but it's not perfect solution since there's delay in showing content, but at least content doesn't look awful while window is opening.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-10-28T12:07:08.000+0000", "updated": "2014-10-28T12:07:08.000+0000" }, { "id": "333433", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending\r\nmaster - https://github.com/appcelerator/titanium_mobile/pull/6387\r\n3_5_X - https://github.com/appcelerator/titanium_mobile/pull/6388", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-11-24T19:05:56.000+0000", "updated": "2014-11-24T19:09:17.000+0000" }, { "id": "334200", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified fix on:\r\n\r\nMac OSX 10.10.1\r\nAppcelerator Studio, build: 3.4.1.201410281743\r\nTitanium SDK build: 3.5.0.v20141125154115, 3.6.0.v20141201111717\r\nTitanium CLI, build: 3.4.1\r\nAlloy: 1.5.1\r\nXcode 6.2 beta\r\niPhone 6 Plus (8.1.1), iPad Retina 2 (8.1.1), iPhone Simulator (8.2)\r\n\r\nUsing the attached code ran on the above devices, behavior now matches the expected and the children are not shown before they are laid out.\r\n\r\nClosing ticket.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2014-12-01T21:51:24.000+0000", "updated": "2014-12-01T21:51:24.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }