{ "id": "91414", "key": "TIMOB-10001", "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": "13574", "description": "Sprint 2012-15 Core", "name": "Sprint 2012-15 Core", "archived": true, "released": true, "releaseDate": "2012-07-30" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-20T16:14:17.000+0000", "created": "2012-05-06T15:02:16.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "qe-port" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [ { "id": "21834", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "102769", "key": "AC-2482", "fields": { "summary": "Labels not showing full contents. ", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-10-09T16:17:28.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": "See attached app.js. I have a couple of labels that span multiple lines of text which should be added to a tableviewrow. Depending on the label length sometimes \"...\" are added to the end and the last part of the text is not shown as expected.\r\n\r\nIn my example: the first row is missing \"sit\" which should be on a new line, the second row is missing the entire line \"Last line\", the third row is correct.\r\n\r\nI assume it has something to do with me specifying left, right, top and bottom on the label to correctly place it inside the tableviewrow. If I remove those layout properties all labels won't show \"...\", but it looks of course ugly ;-)", "attachment": [ { "id": "27800", "filename": "app_5_1_1.js", "author": { "name": "morinel", "key": "morinel", "displayName": "Jeroen van Vianen", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-05-18T14:48:20.000+0000", "size": 3021, "mimeType": "application/x-javascript" }, { "id": "27547", "filename": "app.js", "author": { "name": "morinel", "key": "morinel", "displayName": "Jeroen van Vianen", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-05-06T15:02:16.000+0000", "size": 1713, "mimeType": "application/x-javascript" }, { "id": "27546", "filename": "incorrect_multiline_label_in_tableviewrow.png", "author": { "name": "morinel", "key": "morinel", "displayName": "Jeroen van Vianen", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-05-06T15:02:16.000+0000", "size": 133504, "mimeType": "image/png" }, { "id": "27802", "filename": "screenshot_511_landscape.png", "author": { "name": "morinel", "key": "morinel", "displayName": "Jeroen van Vianen", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-05-18T14:48:20.000+0000", "size": 110368, "mimeType": "image/png" }, { "id": "27801", "filename": "screenshot_511_portrait.png", "author": { "name": "morinel", "key": "morinel", "displayName": "Jeroen van Vianen", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-05-18T14:48:20.000+0000", "size": 121639, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Adding multi-line label with width: Ti.UI.FILL and height: Ti.UI.SIZE to tableviewrow results in incorrect layout and use of \"...\"", "creator": { "name": "morinel", "key": "morinel", "displayName": "Jeroen van Vianen", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "morinel", "key": "morinel", "displayName": "Jeroen van Vianen", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Ti 2.0.1", "comment": { "comments": [ { "id": "193993", "author": { "name": "morinel", "key": "morinel", "displayName": "Jeroen van Vianen", "active": true, "timeZone": "Europe/Berlin" }, "body": "I was able to work around this issue by setting the TableViewRow's layout to 'vertical' and adding a postlayout event listener on every label to update the height of its containing TableViewRow:\r\n\r\n{code}\r\nvar postLayout = function(event) {\r\n label.removeEventListener(\"postlayout\", postLayout);\r\n row.height = label.rect.height + 20; /* label.top + label.bottom */\r\n};\r\n\r\nlabel.addEventListener(\"postlayout\", postLayout);\r\n{code}\r\n\r\n\r\nThis is of course a very tedious solution...", "updateAuthor": { "name": "morinel", "key": "morinel", "displayName": "Jeroen van Vianen", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-05-07T12:52:23.000+0000", "updated": "2012-05-07T12:52:23.000+0000" }, { "id": "194901", "author": { "name": "morinel", "key": "morinel", "displayName": "Jeroen van Vianen", "active": true, "timeZone": "Europe/Berlin" }, "body": "I upgraded to iOS 5.1.1 and now the postlayout event is no longer fired. Specifying SDK 5.0 or 5.1 doesn't make a difference.\r\n\r\nI reverted back to row and label height: 'auto' and everything works again as expected.", "updateAuthor": { "name": "morinel", "key": "morinel", "displayName": "Jeroen van Vianen", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-05-15T14:41:15.000+0000", "updated": "2012-05-15T14:41:15.000+0000" }, { "id": "195329", "author": { "name": "morinel", "key": "morinel", "displayName": "Jeroen van Vianen", "active": true, "timeZone": "Europe/Berlin" }, "body": "I worked on this issue some more. It's very frustrating on an iOS 5.1.1 device, but I managed to get it working with the following set-up:\r\n\r\n* TableViewRow has layout 'vertical'\r\n* TableViewRow has child View with top and bottom specified\r\n* View has child Label with left and right specified\r\n* label has a postlayout event listener that updates the height of the row based upon the height of the view containing the label.\r\n\r\nNote that it doesn't work:\r\n* If the TableViewRow does not have layout 'vertical'\r\n* if View or Label has all four positions set; only carefully setting top and bottom on the View and left and right on the Label (and not vice versa!)\r\n* When adding a postlayout eventlistener on the view or row results in an endless loop.\r\n\r\nAs far as I'm concerned this is *a lot of work* for just a multi-line TableViewRow...\r\n\r\nAdditionally, I noticed that the postlayout event is *not* fired on orientationchange and I would consider that a serious bug.", "updateAuthor": { "name": "morinel", "key": "morinel", "displayName": "Jeroen van Vianen", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-05-18T14:43:14.000+0000", "updated": "2012-05-18T14:43:14.000+0000" }, { "id": "195331", "author": { "name": "morinel", "key": "morinel", "displayName": "Jeroen van Vianen", "active": true, "timeZone": "Europe/Berlin" }, "body": "Here is my updated app.js for iOS 5.1.1 and two screenshots which show it works for portait, but not for landscape mode. The postlayout event is not fired on orientationchange. Therefore the row's height is still the one set in the portrait postlayout event.", "updateAuthor": { "name": "morinel", "key": "morinel", "displayName": "Jeroen van Vianen", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-05-18T14:48:20.000+0000", "updated": "2012-05-18T14:48:20.000+0000" }, { "id": "208518", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR pending https://github.com/appcelerator/titanium_mobile/pull/2611", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-19T14:49:16.000+0000", "updated": "2012-07-19T14:49:16.000+0000" }, { "id": "214406", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fix with:\r\nTitanium Studio, build: 2.1.1.201207271312\r\nTitanium SDK: 2.2.0.v20120813184911\r\nDevices:\r\niPhone 4s 5.0.1\r\niPad1 5.1.1\r\nSimulator 5.1\r\n\r\nNote: works as shown on a screenshot_511.png", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-14T13:20:21.000+0000", "updated": "2012-08-14T13:20:21.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }