PhoneGap 3.3 iOS KeyboardShrinksView

前端 未结 2 593
栀梦
栀梦 2021-01-02 15:25

In PhoneGap/Cordova 3.3 (and 3.2) the preference KeyboardShrinksView for iOS is gone and has been replaced with enableViewPortScale.

<
相关标签:
2条回答
  • 2021-01-02 15:42

    Here is what I ended up doing:

    <meta name="viewport" content="initial-scale=1, minimum-scale=1, 
    maximum-scale=1, user-scalable=0, height=device-height"/>
    

    Thanks to @daniel-miller, the answer above came from him here:

    Keyboard hides iOS input fields in PhoneGap Build 3.1 with an iFrame/object and JQTouch

    Other Help: https://groups.google.com/forum/#!topic/phonegap/87K3lYr6f40

    0 讨论(0)
  • 2021-01-02 15:52

    The commit that removes these (see https://issues.apache.org/jira/browse/CB-4978) states:

    The Keyboard preferences have been removed from core and put into its own plugin in cordova-labs plugins branch.

    I've tracked this down to https://github.com/apache/cordova-plugins/tree/master/keyboard and this fork (?): https://github.com/etiennea/phonegap-keyboard

    This should then allow you to use

    Keyboard.shrinkView(true)
    

    in your JS to minic the old functionality of KeyboardShrinksView

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