1. #1
    Sencha User
    Join Date
    Mar 2014
    Location
    Aix en Pce
    Posts
    9
    Vote Rating
    0
    rfrancois is on a distinguished road

      0  

    Default [Cordova] Problem keyboard with input focus

    [Cordova] Problem keyboard with input focus


    Hello !
    I have a problem when I call an auto-focus in an input field..
    I see the focus on the input but the keyboard doesn't show .. If I tap on the input, I have the focus & the keyboard ..
    How can I solve this ?

    Thanks all !

    ST 2.3.1
    Cordova 3.5.1
    Romain FRANCOIS
    http://syartec.com/

  2. #2
    Sencha User
    Join Date
    May 2011
    Location
    Gainesville, FL
    Posts
    180
    Vote Rating
    12
    fischer1121 is on a distinguished road

      0  

    Default


    Cordova comes with a config for this; Just add it to the config.xml file at the root of the Touch project and you should be good to go:

    Code:
    <preference name="KeyboardDisplayRequiresUserAction" value="false" />
    For non-built apps, it works as well if field#focus() is called within the handler that creates the form. I believe it runs off of a timer (e.g., < 800ms) since last interaction by the user to determine if your request will be respected - but I may be mistaken. Either way it works

  3. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,547
    Vote Rating
    872
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Nice find!
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

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

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

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

  4. #4
    Sencha User
    Join Date
    Mar 2014
    Location
    Aix en Pce
    Posts
    9
    Vote Rating
    0
    rfrancois is on a distinguished road

      0  

    Default


    Hello, Thx for the answer but it doesn't work on Android 4.2 & 4.4 I have find & try this solution before post here .. I saw this solution that is only for iOs. An other idea ?
    Romain FRANCOIS
    http://syartec.com/

  5. #5
    Sencha User
    Join Date
    May 2011
    Location
    Gainesville, FL
    Posts
    180
    Vote Rating
    12
    fischer1121 is on a distinguished road

      0  

    Default


    Haven't tested it, but here's a cordova keyboard plugin with a show method:
    https://github.com/basvanbeek/ionic-plugins-keyboard

    Make sure to uninstall any other keyboard plugins so they don't interfere.

  6. #6
    Sencha User
    Join Date
    Mar 2014
    Location
    Aix en Pce
    Posts
    9
    Vote Rating
    0
    rfrancois is on a distinguished road

      0  

    Default


    I try it too, but this softkeyboard is not for special input (tel,num,url,email ..) ... isn't it ?
    Romain FRANCOIS
    http://syartec.com/

  7. #7
    Sencha User
    Join Date
    Oct 2014
    Posts
    2
    Vote Rating
    0
    tt1987 is on a distinguished road

      0  

    Default


    Cordova comes with a config for this; Just add it to the config.xml file at the root of the Touch project and you should be good to go:Code:
    For non-built apps, it works as well if field#focus() is called within the handler that creates the form. I believe it runs off of a timer (e.g., < 800ms) since last interaction by the user to determine if your request will be respected - but I may be mistaken. Either way it works this is really effective