Results 1 to 7 of 7

Thread: [Cordova] Problem keyboard with input focus

  1. #1
    Sencha User
    Join Date
    Mar 2014
    Location
    Aix en Pce
    Posts
    9
    Vote Rating
    0
      0  

    Default [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
    228
    Vote Rating
    27
      1  

    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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Nice find!
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  4. #4
    Sencha User
    Join Date
    Mar 2014
    Location
    Aix en Pce
    Posts
    9
    Vote Rating
    0
      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
    228
    Vote Rating
    27
      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
      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
      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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •