1. #1
    Sencha Premium Member
    Join Date
    May 2013
    Posts
    8
    Vote Rating
    0
    PavelMarkovnin is on a distinguished road

      0  

    Default Show keyboard on iOS automatically

    Show keyboard on iOS automatically


    I am developing a sencha touch application for ipad. I'm stuck with one feature: when user sees a screen with text field, I need to focus on that field automatically so that iPad's keyboards shows up (design feature to save time on the flow).

    I trid to set focus on input when the screen is being shown. The following example works everywhere except iPad:
    http://jsfiddle.net/ZVaP3/3/

    So I added special "Set focus" button to test it in ipad and it works. But I got confused with this strange behaviour. Why I can set the focus using the button, but with the painted event in textfield I can't. And is there any way to solve this via painted event?
    I would appreciate any help from you! Thank you!

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    3,955
    Vote Rating
    132
    fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all

      0  

    Default


    iOS only sets focus when inside a touch event handler.
    http://stackoverflow.com/questions/1...-mobile-safari
    Get more personalized support via a support subscription.

    Want to learn Sencha Touch 2? Check out
    Sencha training
    Sencha Touch in Action

    Need more help with your app? Hire Sencha Services services@sencha.com

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

Thread Participants: 1

Tags for this Thread