In the ionic project, the soft keyboard input method automatically pops up on ios, ionicios
1. Install the plug-in cordova plugin add ionic-plugin-keyboard
II,
Soft keyboard display listener
Window. addEventListener ('native. keyboardshow ', function (e ){
// Todo operation when the keyboard is available
// E. keyboardHeight indicates the height when the software disk is displayed })
Keypad hidden listener
Window. addEventListener ('native. keyboardhide ', function (e ){
// Todo operations when the keyboard is unavailable });
Enable the keyboard
Cordova. plugins. Keyboard. show ();
Close the keypad
Cordova. plugins. Keyboard. close ();
Determine whether the keypad is available
Cordova. plugins. Keyboard. isVisible
Show/hide the attachment bar of the keypad
Cordova. plugins. Keyboard. hideKeyboardAccessoryBar (true );
Cordova. plugins. Keyboard. hideKeyboardAccessoryBar (false );
Disable and allow slide
cordova.plugins.Keyboard.disableScroll(true);
cordova.plugins.Keyboard.disableScroll(false);
View http://blog.csdn.net/sean_css/article/details/70243893