[TIMOB-10497] iOS: Insert text at current cursor position
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-04-08T20:58:06.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | 2014 Sprint 07, 2014 Sprint 07 SDK, Release 3.3.0 |
Components | iOS |
Labels | api, module_textarea, module_textfield, qe-closed-3.3.0, qe-testadded |
Reporter | Markus Wutzler |
Assignee | Vishal Duggal |
Created | 2012-08-06T01:57:09.000+0000 |
Updated | 2014-04-24T09:26:58.000+0000 |
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.
Usecase: In some kind of Twitter Application i wanna provide a '#' and a '@' button for faster writing a message.
I really need this featureļ¼hope you can fix it in next version!
I really need this feature, too for a implementation of a Texteditor under iOS. Thank you for solve this.
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.
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?
No solution / workaround yet. :-( Only native extension possible yet.
Are there any updates on this issue?
So, will this issue be resolved by 10/Feb/14?
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. Test CasePull pending against master https://github.com/appcelerator/titanium_mobile/pull/5568
Verified fix with below environment: Appc Studio: 3.3.0.201404211130 SDK build: 3.3.0.v20140422163054 acs: 1.0.14 npm: 1.3.2 alloy: 1.4.0-dev CLI: titanium-3.3.0-dev titanium-code-processor:1.1.1-beta1 Xcode: 5.1.1 Osx: Mavericks(10.9.2) Device: iPhone 5C( iOS 7.1) and Galaxy Nexus (4.1) Able to insert text at the current location in both TextField and TextArea. Hence Closing the issue.