3

Tried a lot of things

<preference name="fullscreen"                 value="false" />  
<preference name="android-windowSoftInputMode"    value="adjustResize" />

This seems to be the prefered methods however my keyboard still show on top of my input.

Should adjustResize force the app window to resize? do I need something else?

How can I stop it from hiding my element in position fixed bottom?

Thanks

Cedric Dugas
  • 1,254
  • 2
  • 17
  • 31

2 Answers2

2

Try something like this:

Add these piece of code in $(document).ready(function() {}); function in your html page where soft keyboard is appearing.

 var initialScreenSize = window.innerHeight;
 window.addEventListener("resize", function() {
  if(window.innerHeight < initialScreenSize){
     $("#footer").hide();
     document.body.style.position = "fixed";
  }
  else{
     document.body.style.position = "";
     $("#footer").show();                                      
  }
 });

This will might help you.

Avijit
  • 3,796
  • 4
  • 31
  • 44
0

You can detect focused textarea or input then wait a while until keyboard is shown and finally scroll the page to reach focused input. Hope this help you, cheers.

var container = $('body'),
        scrollTo = $('#textarea');

    setTimeout((function() {
        container.animate({
        scrollTop: scrollTo.offset().top - container.offset().top + container.scrollTop()
        });
    }), 500);
Lorenz Meyer
  • 17,418
  • 21
  • 68
  • 109
dianakarenms
  • 2,220
  • 1
  • 18
  • 22