Fullscreen Keyboard for Android app by Phonegap build

前端 未结 1 1154
轮回少年
轮回少年 2021-01-16 18:37

Problem :- I am developing an android application which has got 2 fields. When focus on the fields, virtual keyboard will hide/overlaped on these field. So

1条回答
  •  再見小時候
    2021-01-16 19:06

    Ok, I finally solved this problem with below jQuery Patch :

    //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));
     });
    

    0 讨论(0)
提交回复
热议问题