Cordova/Phonegap 3.1 keyboard (still) overlays focused form fields - iOS 7

前端 未结 5 1844
不知归路
不知归路 2020-12-28 22:56

Hi guys I just upgraded from cordova 3.0 to 3.1 and I\'m still experiencing a very disturbing issue (which still exists when playing with KeyboardShrinksView preference).

5条回答
  •  佛祖请我去吃肉
    2020-12-28 23:30

    Just had a very similar problem to this. Some of the hacks found on this site did work, but had nasty side effects (such as making a mess of scrolling or CSS layout). Finally came up with a brand new stupid hack.

    Viewport meta tag:

    
    

    JavaScript run after load:

    document.body.style.height = screen.availHeight + 'px';
    

    And that's it. Works on iOS 7 and I have no idea why.

提交回复
热议问题