Phonegap iOS6: Proper solution to Remove form assistant bar (prev, next, done)

前端 未结 6 1039
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-31 06:07

Another \"how to remove the pre, next, done button\" -question you may think. Not really actually. I\'ve done some rather thorough research on this and tried out di

6条回答
  •  忘掉有多难
    2020-12-31 06:42

    If you are using phonegap/cordova 3 CLI, you now require a plugin to remove the toolbar. Install it via the terminal..

    $ cordova plugin add org.apache.cordova.keyboard 
    

    and use this in your javascript

    Keyboard.hideFormAccessoryBar(true);
    

    But... it's not perfect. Firstly if you intend to use input.focus() to bring up the keyboard, then the toolbar is shown briefly before being hidden. From then on it's fine. If you allow a user to click directly in the input field it will be fine.

    Then there can be movement at the top of the screen, which can be solved with this answer.. How to fix keyboard issues with Cordova 3.1 on iOS?

    It can be difficult to get right, so I'd ask yourself if you really need to hide it, or can you make it useful for the user instead?

提交回复
热议问题