{ "id": "81349", "key": "TIMOB-5491", "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": "15108", "description": "2013 Sprint 10", "name": "2013 Sprint 10", "archived": true, "released": true, "releaseDate": "2013-05-20" } ], "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": "2013-05-08T07:20:11.000+0000", "created": "2011-10-10T13:01:56.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api" ], "versions": [ { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "issuelinks": [], "assignee": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-29T17:12:52.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\nIn a very particular case, the text in a text area can get visually cropped until you scroll its container. This bug is... odd. But more pervasive than would seem logical.\r\n\r\nHere are all the components necessary for the bug to manifest. Remove any of them, and the bug goes away:\r\n\r\n - Start with a window that has a scrollable view\r\n - Add two table views to the scrollable view as its first and second pages\r\n - Each table view has inside of it a row with a text area\r\n - When the window is focused, use setData to create the rows for the offscreen (second) page.\r\n - Certain lengths of text must be used; something that is a few words past one line works well\r\n\r\nh2. How To Reproduce\r\nDrop the following in an app.js. Run it on an iPad in landscape orientation. Swipe to the right, and look at the text area \"Wasdasda....\". Notice that only one line of text appears. Now scroll the table view, and a second line of text will appear. This isn't programmatic -- it's magic.\r\n\r\n{code:title=app.js}\r\nfunction nodeArea(args) {\r\n var row = Ti.UI.createTableViewRow({ height: 135 });\r\n row.add(Ti.UI.createTextArea({\r\n font: { fontFamily: 'Helvetica Neue', fontSize: 18, fontWeigth: 'bold' },\r\n value: args.area.value, left: 222, right: 8,\r\n borderWidth: 1, borderColor: '#bbb', borderRadius: 8, borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED\r\n }));\r\n return row;\r\n}\r\n\r\nvar rootWindow = Ti.UI.createWindow();\r\nvar view2 = Ti.UI.createTableView({\r\n separatorStyle: 1, style: Ti.UI.iPhone.TableViewStyle.GROUPED\r\n});\r\nrootWindow.add(Ti.UI.createScrollableView({\r\n views: [\r\n Ti.UI.createTableView({\r\n separatorStyle: 1, style: Ti.UI.iPhone.TableViewStyle.GROUPED,\r\n data: [\r\n nodeArea({\r\n area: { value: '1. Swipe Right, 2. Look at text area, and 3. scroll the table view.' }\r\n })\r\n ]\r\n }),\r\n view2\r\n ],\r\n showPagingControl: true,\r\n pagingControlHeight: 40\r\n}));\r\nrootWindow.addEventListener('focus', function() {\r\n view2.setData([\r\n nodeArea({\r\n area: { value: 'Wasdasdascasdawdweteter er ter ter ter ter tre ter ter ter ter ter er ger ger er er ger gerer ger g' }\r\n })\r\n ]);\r\n});\r\n\r\nrootWindow.open();\r\n{code}\r\n", "attachment": [ { "id": "23436", "filename": "textAreaCrop-before.gif", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-10-10T13:07:40.000+0000", "size": 10162, "mimeType": "image/gif" }, { "id": "23437", "filename": "textAreaLeak-after.gif", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-10-10T13:07:40.000+0000", "size": 11230, "mimeType": "image/gif" } ], "flagged": false, "summary": "iOS: TextArea Text Cropped when Created in Focus Method, Contained in Table View in Offscreen Scrollable View", "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": "Broken on iPad 1 w/iOS 4.3.5, iPad 2 w/iOS 5.0 GM\r\nTested with branch-5062, 4d33a6a... 10/06/11 00:22\r\nTested with master, 69d16dc... 10/08/11 19:38", "comment": { "comments": [ { "id": "168685", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "Added a couple screenshots to demonstrate what I am seeing on device.", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-10-10T13:07:40.000+0000", "updated": "2011-10-10T13:07:40.000+0000" }, { "id": "168711", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This one is perplexing, as I still haven't figured out the right incantation on this one. For those of you playing along, the Ti text field is the right size. The native UI text field is the right size. Apple's PrivateAPI webview that renders the text, however, is only 62 pixels high, cropping the text in the manner described.\r\n\r\nTelling the native UI textfield to sizeToFit, change frame, move, layoutSubviews, setNeedsRedraw, all of these do not trigger the refresh that scrolling does.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-10T17:06:17.000+0000", "updated": "2011-10-10T17:06:17.000+0000" }, { "id": "168719", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Still no luck on the right incantation to get around Apple's bug, no matter what tricks I tried on the native side. HOWEVER, there is a workaround.\r\n\r\n{code}\r\nfunction nodeArea(args) {\r\n var row = Ti.UI.createTableViewRow({ height: 135 });\r\n var textArea = Ti.UI.createTextArea({\r\n font: { fontFamily: 'Helvetica Neue', fontSize: 18, fontWeigth: 'bold' },\r\n value: args.area.value, left: 222, right: 8,\r\n borderWidth: 1, borderColor: '#bbb', borderRadius: 8, borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED\r\n });\r\n textArea.value = args.area.value + '\\n';\r\n row.add(textArea);\r\n setTimeout(function(){textArea.value = args.area.value;},10);\r\n return row;\r\n}\r\n{code}\r\n\r\nGiven the rarity of this edge case, and the dangers of regressions in trying to jury rig UITextField to do the right thing, I think the workaround is the best bet currently, especially if the height is not 'auto'.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-10T20:24:39.000+0000", "updated": "2011-10-10T20:24:39.000+0000" }, { "id": "168723", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We need to keep this ticket open until there is a clear reproduction case outside Titanium, so that we can file the appropriate bug in Radar. openradar does not list any obvious duplicate.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-10T22:40:33.000+0000", "updated": "2011-10-10T22:40:33.000+0000" }, { "id": "250757", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "cannot reproduce\r\n\r\nTested with\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.1.0\r\niOS iPhone Simulator: iOS SDK version: 6.0", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-08T07:20:11.000+0000", "updated": "2013-05-08T07:20:11.000+0000" }, { "id": "258708", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue does not reproduces\r\n\r\nTested with\r\n\r\niOS SDK: 5.1\r\niOS iPad Simulator: 5.1\r\nMac OS X Version 10.7.5\r\nTitanium SDK version 3.1.1.v20130606121419\r\nTitanium Studio, build: 3.0.1.201212181159\r\n", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-20T09:48:33.000+0000", "updated": "2013-06-21T06:20:35.000+0000" }, { "id": "416192", "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-29T17:12:52.000+0000", "updated": "2017-03-29T17:12:52.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }