You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1017 B

7 years ago
  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;