keyboard.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. console.warn('hideKeyboardAccessoryBar has been removed until a method is found that doesn\'t get rejected from the App Store.')
  9. };
  10. Keyboard.close = function() {
  11. exec(null, null, "Keyboard", "close", []);
  12. };
  13. Keyboard.show = function() {
  14. console.warn('Showing keyboard not supported in iOS due to platform limitations.')
  15. console.warn('Instead, use input.focus(), and ensure that you have the following setting in your config.xml: \n');
  16. console.warn(' <preference name="KeyboardDisplayRequiresUserAction" value="false"/>\n');
  17. // exec(null, null, "Keyboard", "show", []);
  18. };
  19. Keyboard.disableScroll = function(disable) {
  20. exec(null, null, "Keyboard", "disableScroll", [disable]);
  21. };
  22. /*
  23. Keyboard.styleDark = function(dark) {
  24. exec(null, null, "Keyboard", "styleDark", [dark]);
  25. };
  26. */
  27. Keyboard.isVisible = false;
  28. module.exports = Keyboard;