Phonegap: Keyboard changes window height in iOS 7

前端 未结 9 581
一整个雨季
一整个雨季 2020-12-14 21:48

In iOS 6 everything works fine. The keyboard opens and moves the input into view. When the keyboard closes everything goes back where it should.

In iOS 7 the keyboar

9条回答
  •  春和景丽
    2020-12-14 22:11

    I had a similar issue that drove me nuts for days. Not sure if this will help anyone else, but this is what solved it for me: (note I'm using jquery finger library to listen to tap events):

    $('body').delegate("#send_feedback_button","tap", function(event){
      $('textarea').blur();
      event.stopImmediatePropagation();
      // do my stuff 
    });
    

    For me calling blur on any textarea in the view was the trick. The stopImmediatePropagation got rid of some other funkiness.

提交回复
热议问题