Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49215

Focus input programatically + scroll

$
0
0

@mnbattaglia wrote:

I’ve an app where I need to set focus on a certain input field. The first problem I’ve found was setting the focus (with setfocus method) didn’t do anything. Tried in the class constructor and also in the ionviewdidload event. After doing some research and reading some posts, I ended up calling the method in a timer. The thing is, depending on the view, sometimes a delay of 100 ms do the trick, but in some others I have to use a bigger one (eg: 500 ms). Also, I have to call Keyboard.Open in order to get my device keyboard up. What’s the reason for this?
The second problem is, although the keyboard pops up, the view does not scroll as expected like it does when you focus on the field manually. Is there any way I can force it?
Thanks!!!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49215

Trending Articles



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