{ "id": "114485", "key": "TIMOB-13905", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2016-08-14T17:24:52.000+0000", "created": "2013-05-16T20:51:25.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "parity" ], "versions": [], "issuelinks": [ { "id": "29871", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "94470", "key": "TIMOB-9887", "fields": { "summary": "iOS: Support hintText in Text Area (as Documented)", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "28837", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "114548", "key": "TIMOB-13904", "fields": { "summary": "MobileWeb: TextArea with hint text", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "29872", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "116544", "key": "TIMOB-14410", "fields": { "summary": "TiAPI: Add hintTextid to all views", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-08-14T17:24: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": [], "description": "*Problem*\r\nPlease can you add support of \"Hint text\" property in TextArea component also for iOS? Now it is working only on Android and I don't understand why.\r\n\r\nIn my app I have a nice form with normal TextField's (with hint text) and on the end of the form I've got a TextArea, which is without hint text, so it looks inconsistent.\r\n\r\nThere is a workaround by manually checking the values, but this is inconvenient.\r\n\r\n*Workaround*\r\n{code:javascript}\r\nvar textArea = Titanium.UI.createTextArea({\r\n\tvalue : 'Enter Text',\r\n});\r\ntextArea._hintText = textArea.value;\r\n\r\ntextArea.addEventListener('focus', function(e) {\r\n\tif (e.source.value == e.source._hintText) {\r\n\t\te.source.value = \"\";\r\n\t}\r\n});\r\ntextArea.addEventListener('blur', function(e) {\r\n\tif (e.source.value == \"\") {\r\n\t\te.source.value = e.source._hintText;\r\n\t}\r\n});\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: TextArea with hint text", "creator": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "It is working only on Android", "comment": { "comments": [ { "id": "252619", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Separated into 2 reports for iOS and Mobile Web (TIMOB-13904).", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-17T18:37:24.000+0000", "updated": "2013-05-17T18:37:24.000+0000" }, { "id": "252620", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Matej - If you'd like to help us further on this, a simple test case which demonstrates the parity would be useful.\n\nThanks.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-17T18:40:18.000+0000", "updated": "2013-05-17T18:40:18.000+0000" }, { "id": "252627", "author": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sorry I don't know what exactly do you want. Do you want me to use 'workaround' in test case? I am not sure if is it necessarily - example for hintext/placeholder...\r\n\r\n+ I forgot. But for example I can't use 'workaround' in my application because (I wrote it already above) I've got a few TextField's in my form with HinText. Problem is that TextArea has different distance between border / text and as well TextArea has different type of font. So it doesn't looks very well... :(", "updateAuthor": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-17T18:58:38.000+0000", "updated": "2013-05-17T18:59:36.000+0000" }, { "id": "252663", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Just something which shows that the hint text for TextArea is working on Android and not iOS.\n\nFor your second point, I think that resembles a bigger issue. If you use hint text on Android do you have the same issue? Even with the entry text?", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-17T21:47:24.000+0000", "updated": "2013-05-17T21:47:24.000+0000" }, { "id": "252756", "author": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "body": "OK, so:\r\n\r\n*app.js* (hintText sample)\r\n{code:javascript} \r\nvar win = Ti.UI.createWindow({\r\n\tlayout: \"vertical\",\r\n\tbackgroundColor: \"gray\"\r\n});\r\n\r\nvar textField = Ti.UI.createTextField({\r\n\twidth: 250, height: 50,\r\n\ttop: 10,\r\n\thintText: \"Hint text\",\r\n\tbackgroundColor: \"white\"\r\n});\r\n\r\nvar textArea = Ti.UI.createTextArea({\r\n\twidth: 250, height: 50,\r\n\ttop: 50,\r\n\thintText: \"Hint text\",\r\n\tbackgroundColor: \"white\"\r\n});\r\n\r\n\r\nwin.add(textField);\r\nwin.add(textArea);\r\nwin.open();\r\n{code}\r\n\r\n*Screens:* (I have no idea why is font on the Android so high... )\r\n!http://oi44.tinypic.com/2w1t9gg.jpg!\r\n\r\n\r\n*app.js* (Test only with value)\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tlayout: \"vertical\",\r\n\tbackgroundColor: \"gray\"\r\n});\r\n\r\nvar textField = Ti.UI.createTextField({\r\n\twidth: 250, height: 50,\r\n\ttop: 10,\r\n\tvalue: \"Some value\",\r\n\tbackgroundColor: \"white\"\r\n});\r\n\r\nvar textArea = Ti.UI.createTextArea({\r\n\twidth: 250, height: 50,\r\n\ttop: 50,\r\n\tvalue: \"Some value\",\r\n\tbackgroundColor: \"white\"\r\n});\r\n\r\n\r\nwin.add(textField);\r\nwin.add(textArea);\r\nwin.open();\r\n{code}\r\n\r\n*Screens:*\r\n!http://oi39.tinypic.com/1qg7pi.jpg!\r\n\r\n\r\n*app.js* (Same test with values ,but I added font size/weight. You can see that font is exactly same ,but there is space in TextArea between font and border/side)\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tlayout: \"vertical\",\r\n\tbackgroundColor: \"gray\"\r\n});\r\n\r\nvar textField = Ti.UI.createTextField({\r\n\twidth: 250, height: 50,\r\n\ttop: 10,\r\n\tvalue: \"Some value\",\r\n\tfont: {fontSize: 20, fontWeight:\"normal\"},\r\n\tbackgroundColor: \"white\"\r\n});\r\n\r\nvar textArea = Ti.UI.createTextArea({\r\n\twidth: 250, height: 50,\r\n\ttop: 50,\r\n\tvalue: \"Some value\",\r\n\tfont: {fontSize: 20, fontWeight:\"normal\"},\r\n\tbackgroundColor: \"white\"\r\n});\r\n\r\n\r\nwin.add(textField);\r\nwin.add(textArea);\r\nwin.open();\r\n{code}\r\n\r\n*Screen:*\r\n!http://oi39.tinypic.com/35jz47n.jpg!\r\n\r\n\r\nOK, and in the last sample I set in the TextField normal hintText and in the textArea I set custom hintText by 'workaround' + I changed color. Everything else including font size/weight is same like in the previous example.\r\n\r\n*Screen:*\r\n!http://oi39.tinypic.com/1ze8lf5.jpg!", "updateAuthor": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-19T22:01:37.000+0000", "updated": "2013-05-19T22:08:31.000+0000" }, { "id": "252828", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks Matej, very useful.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-20T17:14:28.000+0000", "updated": "2013-05-20T17:14:28.000+0000" }, { "id": "294108", "author": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-21T13:33:19.000+0000", "updated": "2014-02-21T13:33:19.000+0000" }, { "id": "329902", "author": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "body": "This issue has not had much attention lately. It does however seem pretty trivial. Is there a way this feature could be included soon?", "updateAuthor": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-10-29T13:22:25.000+0000", "updated": "2014-10-29T13:27:30.000+0000" }, { "id": "339094", "author": { "name": "trevor_chong", "key": "trevor_chong", "displayName": "Trevor Chong", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes. Agreed. It is a simple feature which a lot of developers use. It would save the community a lot of work.\r\n\r\n", "updateAuthor": { "name": "trevor_chong", "key": "trevor_chong", "displayName": "Trevor Chong", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-01-14T20:29:14.000+0000", "updated": "2015-01-14T20:29:14.000+0000" }, { "id": "393101", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Unfortunately, it is no dimple feature, since iOS does not expose an API for it and Apple does not plan to do so. The simple reason is that a {{UITextView}} is not meant to have placeholder-texts natively. Because we try to stick to the native API-guidelines, we won't expose it as well. \r\n\r\nBut If you still want to use it, you could do it by simply watching the focus-event of the text-field and adjust the text and color property based on the file-length. \r\n\r\nIt's a UI-hack, but that's also how it is suggested by the iOS-community on the native-side. See [this StackOverflow-link|http://stackoverflow.com/questions/1328638/placeholder-in-uitextview] for more infos.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-14T17:24:52.000+0000", "updated": "2016-08-14T17:24:52.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }