Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (keyboard)
Viewing all articles
Browse latest Browse all 352

How can I avoid that ScrollView (fullscreen) scrolls to top after keyboard hides from TextArea (Alloy)?

$
0
0

I want to implement a full screen text editor view in my app (modal view). To do this, I placed a scrollview into the Window and within the ScrollView I created a TextArea. Both of them have width and height set to "Ti.Ui.FILL".

When I tap into the textarea, the keyboard pops up and the scrollview scrolls to the top, so the keyboard does not overlap the textarea. When I blur the TextArea, the keyboard gets hidden, and I can see the TextArea in fullscreen. So far so good.

However, if I have a long text that goes over several lines, scroll several lines towards the end of the text and then want to put the cursor in some specific line in the TextArea, then, after the keyboard comes up, the ScrollView scrolls all the way to the top. (The cursor remains where I tapped). Is there any way to tell the ScrollView not to scroll to the top on focus but instead remain at the text location where I tapped?

Thanks!


Viewing all articles
Browse latest Browse all 352

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>