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

前端 未结 5 1838
不知归路
不知归路 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:24

    Well, logically the view should move up when the keyboard opens. I have faced a similar issue with iOS7 and to fix it I have applied few css tweaks.

    Tweaks were applied on the wrapper class/id which is containing the content of the app.

    position: relative;
    overflow: hidden;
    height: 460px;
    width: 320px;
    

    Note - Height and width are judged dynamically depending on the device height and width

    height = window.innerHeight
    width = window.innerWidth
    

    By using jQuery selectors height and width are appended to wrapping class/id.

提交回复
热议问题