Android HTML5 - soft keyboard overlaps input field

后端 未结 2 1133
我寻月下人不归
我寻月下人不归 2021-02-04 07:15

I\'m a bit tired looking for a solution for overlapping input field by soft keyboard on Android. My problem is very similiar to this one: Soft Keyboard Overlapping with EditText

2条回答
  •  执念已碎
    2021-02-04 07:43

    The simplest way to solve this android nasty (and now in ios7 too) is to use the inputs focus and blur events. If you are not using the footer tag just replace it with the class of your footer element.

    In jQuery:

    $("input").focus(function(){
        $('footer').hide();
    });
    
    $("input").blur(function(){
        $('footer').show();
    });
    

提交回复
热议问题