0

tapping on the text input at the bottom of the page, a virtual keyboard appears (as expected). The problem is that the virtual keyboard overlaps the focused text input. So while I type, I can't see what is being typed. I also cannot scroll down further to the bottom to see the text box, because the page always snaps back up. I am using version of Phonegap 3.5 and jquery 1.9.1

Pawan
  • 31,545
  • 102
  • 256
  • 434

2 Answers2

2

I solved it by focusin and focusout jquery methods :

//JS : OnReady event:

var windowHeightSeventyPercent = parseInt(screen.height * 0.7); //To support multiple devices

$("input").focusin(function(){
    $("body").height($("body").height()+parseInt(windowHeightSeventyPercent)); //Make page body scroll by adding height to make user to fillup field.
});

$("input").focusout(function(){
  $("body").height($("body").height()-parseInt(windowHeightSeventyPercent));
});

Please refer this thread.

Community
  • 1
  • 1
byJeevan
  • 3,728
  • 3
  • 37
  • 60
  • After applied you fix still having same problem can you look into this link. http://jsfiddle.net/4dLwezw1/3/ – Pawan Oct 31 '14 at 12:08
  • Are you using `Phonegap Build` ? If so, kindly share `config.xml` file? Thanks a lot. – byJeevan Nov 01 '14 at 09:28
0

Add the below preference to config.xml

<preference name="android-windowSoftInputMode" value="adjustResize|stateHidden" />
Amr Bahaa
  • 1,057
  • 9
  • 9