{ "id": "98707", "key": "TIMOB-10497", "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": [ { "id": "15939", "description": "2014 Sprint 07", "name": "2014 Sprint 07", "archived": true, "released": true, "releaseDate": "2014-04-11" }, { "id": "15940", "description": "2014 Sprint 07 SDK", "name": "2014 Sprint 07 SDK", "archived": true, "released": true, "releaseDate": "2014-04-11" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-04-08T20:58:06.000+0000", "created": "2012-08-06T01:57:09.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api", "module_textarea", "module_textfield", "qe-closed-3.3.0", "qe-testadded" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-04-24T09:26:58.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": "I've tried several different ways to insert text at current cursor position but there are two major problems. First there is no possibility to get the current cursor position. On iOS there is a possibility to track this position with _change_ and _selected_ events but this is rather defective. Second problem is that (if you've inserted at correct position) the cursor will be set to the end of the text on iOS (I didn't tried on Android.\r\n\r\nUsecase: In some kind of Twitter Application i wanna provide a '#' and a '@' button for faster writing a message.", "attachment": [], "flagged": false, "summary": "iOS: Insert text at current cursor position ", "creator": { "name": "mrvvoo", "key": "mrvvoo", "displayName": "Markus Wutzler", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "mrvvoo", "key": "mrvvoo", "displayName": "Markus Wutzler", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS & Android, Ti SDK 2.1.0", "comment": { "comments": [ { "id": "216963", "author": { "name": "geniuswe@sina.com", "key": "geniuswe@sina.com", "displayName": "Gabriel Lin", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I really need this featureļ¼Œhope you can fix it in next version!", "updateAuthor": { "name": "geniuswe@sina.com", "key": "geniuswe@sina.com", "displayName": "Gabriel Lin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-30T00:05:58.000+0000", "updated": "2012-08-30T00:05:58.000+0000" }, { "id": "221508", "author": { "name": "wzeidler", "key": "wzeidler", "displayName": "Walter Zeidler", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I really need this feature, too for a implementation of a Texteditor under iOS. Thank you for solve this. ", "updateAuthor": { "name": "wzeidler", "key": "wzeidler", "displayName": "Walter Zeidler", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-29T16:24:36.000+0000", "updated": "2012-09-29T16:24:36.000+0000" }, { "id": "221515", "author": { "name": "mrvvoo", "key": "mrvvoo", "displayName": "Markus Wutzler", "active": true, "timeZone": "Europe/Berlin" }, "body": "Yes, we need it also. We're now planning to release our app without this feature. This is bad for our customers but we didn't find a useful solution till today.", "updateAuthor": { "name": "mrvvoo", "key": "mrvvoo", "displayName": "Markus Wutzler", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-09-29T21:46:38.000+0000", "updated": "2012-09-29T21:46:38.000+0000" }, { "id": "260858", "author": { "name": "vitr", "key": "vitr", "displayName": "Vitr", "active": true, "timeZone": "Europe/Berlin" }, "body": "We are talking about a TextArea - aren't we? I would need that feature, too! Is there at least a way to get the current cursor position, so I can scroll the containing scrollview to this position programmatically?", "updateAuthor": { "name": "vitr", "key": "vitr", "displayName": "Vitr", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-07-04T14:10:30.000+0000", "updated": "2013-07-04T14:10:30.000+0000" }, { "id": "266849", "author": { "name": "mrvvoo", "key": "mrvvoo", "displayName": "Markus Wutzler", "active": true, "timeZone": "Europe/Berlin" }, "body": "No solution / workaround yet. :-( Only native extension possible yet.", "updateAuthor": { "name": "mrvvoo", "key": "mrvvoo", "displayName": "Markus Wutzler", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-08-16T11:11:22.000+0000", "updated": "2013-08-16T11:11:22.000+0000" }, { "id": "273459", "author": { "name": "thul999", "key": "thul999", "displayName": "Hagen Nordheim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Are there any updates on this issue?", "updateAuthor": { "name": "thul999", "key": "thul999", "displayName": "Hagen Nordheim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-30T22:56:27.000+0000", "updated": "2013-09-30T22:56:27.000+0000" }, { "id": "287964", "author": { "name": "thul999", "key": "thul999", "displayName": "Hagen Nordheim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "So, will this issue be resolved by 10/Feb/14?", "updateAuthor": { "name": "thul999", "key": "thul999", "displayName": "Hagen Nordheim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-13T17:18:26.000+0000", "updated": "2014-01-13T17:18:26.000+0000" }, { "id": "299549", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Exposed property `selection` on TextArea and TextField to get current cursor characteristics on iOS and Android. We already have support for setSelection(start,end) on iOS and Android.\n\nTest Case\n\n{code}\nvar win = Ti.UI.createWindow({backgroundColor:'white',layout:'vertical',fullscreen:true});\n\nvar control = Ti.UI.createView({width:Ti.UI.SIZE,height:Ti.UI.SIZE,layout:'horizontal'});\n\nvar b1 = Ti.UI.createButton({title:'TEXTFIELD',right:10});\nvar b2 = Ti.UI.createButton({title:'TEXTAREA',left:10});\ncontrol.add(b1);\ncontrol.add(b2);\nvar textField = Ti.UI.createTextField({top:10,height:40, width:Ti.UI.FILL, value:'I am a text field'});\nvar textArea = Ti.UI.createTextArea({top:10,height:40, width:Ti.UI.FILL, value: 'I am a text area'});\nwin.add(control);\nwin.add(textField);\nwin.add(textArea);\nwin.open();\n\nb1.addEventListener('click',function(e){\n Ti.API.info('\\n\\n****************');\n Ti.API.info('TEXTFIELD');\n var result = textField.selection;\n if(result == null || result == undefined) {\n Ti.API.info('NO selection info available from property');\n } else {\n Ti.API.info('PROPERTY selection start:'+result.location+' length:'+result.length);\n }\n \n var result1 = textField.getSelection();\n if(result1 == null || result1 == undefined) {\n Ti.API.info('NO selection info available from method');\n } else {\n Ti.API.info('METHOD selection start:'+result1.location+' length:'+result1.length);\n }\n Ti.API.info('****************');\n})\n\n\nb2.addEventListener('click',function(e){\n Ti.API.info('\\n\\n----------------------');\n Ti.API.info('TEXTAREA');\n var result = textArea.selection;\n if(result == null || result == undefined) {\n Ti.API.info('NO selection info available from property');\n } else {\n Ti.API.info('PROPERTY selection start:'+result.location+' length:'+result.length);\n }\n \n var result1 = textArea.getSelection();\n if(result1 == null || result1 == undefined) {\n Ti.API.info('NO selection info available from method');\n } else {\n Ti.API.info('METHOD selection start:'+result1.location+' length:'+result1.length);\n }\n Ti.API.info('----------------------');\n})\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-04-01T20:21:38.000+0000", "updated": "2014-04-01T20:21:38.000+0000" }, { "id": "299555", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending against master\r\nhttps://github.com/appcelerator/titanium_mobile/pull/5568", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-04-01T21:04:00.000+0000", "updated": "2014-04-01T21:04:00.000+0000" }, { "id": "302163", "author": { "name": "nmittal", "key": "nmittal", "displayName": "Neha Mittal", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified fix with below environment:\r\n\r\nAppc Studio: 3.3.0.201404211130\r\nSDK build: 3.3.0.v20140422163054\r\nacs: 1.0.14\r\nnpm: 1.3.2\r\nalloy: 1.4.0-dev\r\nCLI: titanium-3.3.0-dev\r\ntitanium-code-processor:1.1.1-beta1\r\nXcode: 5.1.1\r\nOsx: Mavericks(10.9.2)\r\nDevice: iPhone 5C( iOS 7.1) and Galaxy Nexus (4.1)\r\n\r\nAble to insert text at the current location in both TextField and TextArea.\r\nHence Closing the issue.", "updateAuthor": { "name": "nmittal", "key": "nmittal", "displayName": "Neha Mittal", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-04-23T10:47:58.000+0000", "updated": "2014-04-23T10:47:58.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }