简体   繁体   中英

Hide bar (at the bottom) of ios when connect ipad to bluetooth keyboard

Hi I'm developing phonegap/cordova project for ios device -- ipad. The app receive input text via bluetooth keyboard (because I don't want to show the keyboard on the screen). So far app can receive input as expected But about the apperance How can I remove or hide the bar at the bottom of the screen? (please see images in the link below)

https://www.dropbox.com/sh/rt5w3ccqomec335/AADKUvt0w6KigfADAsx-ciu_a?dl=0

Here are my code

Config.xml:

<preference name="KeyboardDisplayRequiresUserAction" value="false" />

HTML:

<div style="overflow: hidden; position: relative; width: 1px; height: 1px; left: -500px">
     <input id="input" type="textfield" autocorrect="off" autocapitalize="off">
</div>

JS:

document.getElementById('input').focus();

Thank you so much for your help!

Install this plugin to your project : https://github.com/driftyco/ionic-plugin-keyboard

And use this in JS : cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); Documentation detail: https://github.com/driftyco/ionic-plugin-keyboard#keyboardhidekeyboardaccessorybar

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM