keyboard.js 1017 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. var argscheck = require('cordova/argscheck'),
  2. utils = require('cordova/utils'),
  3. exec = require('cordova/exec');
  4. var Keyboard = function() {
  5. };
  6. Keyboard.hideKeyboardAccessoryBar = function(hide) {
  7. exec(null, null, "Keyboard", "hideKeyboardAccessoryBar", [hide]);
  8. };
  9. Keyboard.close = function() {
  10. exec(null, null, "Keyboard", "close", []);
  11. };
  12. Keyboard.show = function() {
  13. console.warn('Showing keyboard not supported in iOS due to platform limitations.')
  14. console.warn('Instead, use input.focus(), and ensure that you have the following setting in your config.xml: \n');
  15. console.warn(' <preference name="KeyboardDisplayRequiresUserAction" value="false"/>\n');
  16. // exec(null, null, "Keyboard", "show", []);
  17. };
  18. Keyboard.disableScroll = function(disable) {
  19. exec(null, null, "Keyboard", "disableScroll", [disable]);
  20. };
  21. /*
  22. Keyboard.styleDark = function(dark) {
  23. exec(null, null, "Keyboard", "styleDark", [dark]);
  24. };
  25. */
  26. Keyboard.isVisible = false;
  27. module.exports = Keyboard;