phonegap / build

This is the public repository for PhoneGap Build source and bug tracking
92 stars 33 forks source link

[ios] allow keyboardDisplayRequiresUserAction setting through config.xml #39

Closed alunny closed 11 years ago

alunny commented 11 years ago

see here: http://community.phonegap.com/nitobi/topics/calling_focus

ngirardin commented 11 years ago

Hi alunny,

Any progress on this issue? I really need the ability to set keyboardDisplayRequiresUserAction via the config.xml :)

jcrutch commented 11 years ago

I too need the keyboardDisplayRequiresUserAction to work. Is there an estimated delivery date on this functionality?

robyweb commented 11 years ago

I also REALLY need this feature for the app that I am developing. Can you please give and ETA on when this may be supported?

Thanks!

bobeast commented 11 years ago

This functionality is available in phonegap 2.2.0+

for 2.2.0, make sure Cordova.plist contains the KeyboardDisplayRequiresUserAction key with its boolean value set to your requirements.

for 2.3.0, just add a line similar to the following to your config.xml file.

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

OR

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

jcrutch commented 11 years ago

The keyboard never shows before the user taps on my fields even though they have focus. I am using CordovaLib-2.4.0 and I have the following entry in my config.xml: < preference name="KeyboardDisplayRequiresUserAction" value="false" />

robyweb commented 11 years ago

I am using jQuery mobile and what I found was that the keyboard will launch if I delay the focus call until after the page has initialized. All I did was add the following:

setTimeout(function() { $(selector).focus(); }, 1000);

This has worked consistently for me. Hope it helps.

Fred

On Thu, Feb 28, 2013 at 8:38 AM, jcrutch notifications@github.com wrote:

The keyboard never shows before the user taps on my fields even though they have focus. I am using CordovaLib-2.4.0 and I have the following entry in my config.xml.

— Reply to this email directly or view it on GitHubhttps://github.com/phonegap/build/issues/39#issuecomment-14242625 .

jcrutch commented 11 years ago

robyweb rocks! That did the trick. The following approach was only setting the focus without the keyboard: setTimeout('$(selector).focus();',0);