Autofocus on controller initialization

Hello,
I try to focus on an input in a view when the controller is initialized (I want the keyboard to be opened too).
With the “autofocus” attribute on the input, it works just one time but the keyboard is not opened.
So how to focus on this input and open the keyboard every time my controller is initialized ? ^^
Thanks in advance for the help. :slight_smile:

iOS? If iOS, you need this in your config.xml before you can programmatically set focus.

<preference name="KeyboardDisplayRequiresUserAction" value="false" />

Unfortunatly my case is for Android at the moment. :stuck_out_tongue:

Well HTML5 has an autofocus feature that you can apply to inputs. They will get focus on load.

Yes, this is what I tried. (see my first message :slight_smile: )
I didn’t retry with the beta 4 yet, will do !

do’ugh, thats what I get for only reading the title lol.