{ "id": "76550", "key": "TIMOB-5585", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2012-01-27T09:58:38.000+0000", "created": "2011-06-20T03:45:46.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2014-01-28T23:44:49.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": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "Autocapitalization affects all text in textField and textArea objects. It should change only new symbols which were inputted after autocapitalization property was defined.\r\n{code:JavaScript}\r\nvar win = Ti.UI.currentWindow;\r\nwin.backgroundColor = '#fff';\r\nwin.layout = 'vertical';\r\n\r\nvar l = Ti.UI.createLabel({\r\n\ttop:10,\r\n\tleft:10,\r\n\theight: 60,\r\n\tfont:{fontSize:20},\r\n\tcolor:'black',\r\n\theight:50,\r\n\twidth:300\r\n});\r\n\r\nTi.UI.currentWindow.add(l);\r\n\r\nvar ta1 = Ti.UI.createTextArea({\r\n\tcolor:'#336699',\r\n\theight:130,\r\n\tfocusable: true,\r\n\tfontSize: 14,\r\n\ttop:5,\r\n\tleft:10,\r\n\theight:100,\r\n\twidth:300,\r\n\tisvisible: true,\r\n\tborderStyle:Ti.UI.INPUT_BORDERSTYLE_ROUNDED,\r\n\tborderWidth:2,\r\n borderColor:'#bbb',\r\n borderRadius:5\r\n});\r\n\r\nTi.UI.currentWindow.add(ta1);\r\n\r\nta1.addEventListener('return', function(e){\r\n\tl.text = 'return key pressed. Changing field value';\r\n\t(ta1.value)?ta1.value += 'line added by API':ta1.value = 'line added by API';\t\r\n});\r\nta1.addEventListener('focus', function(e){\r\n\tl.text = 'Textarea got focus';\r\n});\r\nta1.addEventListener('blur', function(e){\r\n\tl.text = 'Textarea lost focus';\r\n});\r\nta1.addEventListener('change', function(e){\r\n\tl.text = 'Textarea was changed, val = ' + ta1.value;\t\r\n});\r\n\r\nvar focus = Ti.UI.createButton({\r\n\ttitle:'Focus',\r\n\theight:40,\r\n\ttop:5,\r\n\tleft:10,\r\n\twidth:300,\r\n\tfont:{fontSize:20}\r\n});\r\nvar blur = Ti.UI.createButton({\r\n\ttitle:'Blur',\r\n\theight:40,\r\n\ttop:5,\r\n\tleft:10,\r\n\twidth:300,\r\n\tfont:{fontSize:20}\r\n});\r\n\r\nvar showHide = Ti.UI.createButton({\r\n\ttitle:'Click to Hide/Show',\r\n\theight:40,\r\n\ttop:5,\r\n\tleft:10,\r\n\twidth:300,\r\n\tfont:{fontSize:20}\r\n});\r\n\r\nvar format = Ti.UI.createButton({\r\n\ttitle:'Autocapitalization. Click me',\r\n\theight:40,\r\n\ttop:5,\r\n\tleft:10,\r\n\twidth:300,\r\n\tfont:{fontSize:20}\r\n});\r\n\r\nvar close = Ti.UI.createButton({\r\n\ttitle:'Close',\r\n\theight:40,\r\n\ttop:5,\r\n\tleft:10,\r\n\twidth:300,\r\n\tfont:{fontSize:20}\r\n});\r\nTi.UI.currentWindow.add(focus);\r\nTi.UI.currentWindow.add(blur);\r\nTi.UI.currentWindow.add(showHide);\r\nTi.UI.currentWindow.add(format);\r\nTi.UI.currentWindow.add(close);\r\n\t\r\nfocus.addEventListener('click', function(){\r\n\tta1.focus();\r\n});\r\n\r\nblur.addEventListener('click', function(){\r\n\tta1.blur();\r\n});\r\n\r\nclose.addEventListener('click', function(){\r\n\tTi.UI.currentWindow.close();\r\n});\r\n\r\nshowHide.addEventListener('click', function(){\r\n\tif (ta1.isvisible){\r\n\t\tta1.hide();\r\n\t\tta1.isvisible = false;\r\n\t}else{\r\n\t\tta1.show();\r\n\t\tta1.isvisible = true;\r\n\t} \r\n})\t\r\n\r\nvar state = 0;\r\nformat.addEventListener('click', function(){\r\n\tswitch(state){\r\n\t\tcase 0:{\r\n\t\t\tta1.autocapitalization = Ti.UI.TEXT_AUTOCAPITALIZATION_WORDS;\r\n\t\t\tformat.title = 'Click to change font';\r\n\t\t\tstate ++;\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t}\r\n\t\tcase 1:{\r\n\t\t\tformat.title = 'Click to disable edit';\r\n\t\t\tta1.font = {\r\n\t\t\t\tfontSize:20,\r\n\t\t\t\tfontStyle:'italic',\r\n\t\t\t\tfontWeight:'bold'\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tstate++;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase 2:{\r\n\t\t\tformat.title = 'Reset';\r\n\t\t\tta1.editable = false;\r\n\t\t\tstate++;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase 3:{\r\n\t\t\tformat.title = 'Autocapitalization. Click me',\r\n\t\t\tta1.autocapitalization = Ti.UI.TEXT_AUTOCAPITALIZATION_NONE;\r\n\t\t\tta1.font = {\r\n\t\t\t\tfontSize:14,\r\n\t\t\t\tfontStyle:'',\r\n\t\t\t\tfontWeight:'normal'\r\n\t\t\t};\r\n\t\t\tta1.editable = true;\r\n\t\t\tta1.paddingLeft = 0;\r\n\t\t\tta1.paddingRight = 0;\r\n\t\t\tstate = 0;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n});\r\n{code}", "attachment": [], "flagged": false, "summary": "MobileWeb: Autocapitalization affects on all text. It should change only new symbols. ", "creator": { "name": "mvasko", "key": "mvasko", "displayName": "Misha Vasko", "active": true, "timeZone": "Europe/Kiev" }, "subtasks": [], "reporter": { "name": "mvasko", "key": "mvasko", "displayName": "Misha Vasko", "active": true, "timeZone": "Europe/Kiev" }, "environment": null, "comment": { "comments": [ { "id": "180888", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Autocapitalization was implemented in TIMOB-7222.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2012-01-27T09:58:39.000+0000", "updated": "2012-01-27T09:58:39.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }