From d6e095752f732d859b664dc1027dcaae86f2c2f9 Mon Sep 17 00:00:00 2001 From: Steven Day Date: Thu, 28 Apr 2016 12:17:12 +0100 Subject: Swap the SoftKeyboard plugin for ionic's We already had this plugin to help solve issues with the view scrolling on iOS, and since it offers the same functionality for closing the keyboard as the SoftKeyboard plugin, it makes sense to only use one. --- www/index.html | 1 - www/js/softkeyboard.js | 34 ---------------------------------- www/js/views/fms.js | 3 +-- 3 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 www/js/softkeyboard.js diff --git a/www/index.html b/www/index.html index 5cd55ae..4f73897 100644 --- a/www/index.html +++ b/www/index.html @@ -36,7 +36,6 @@ - diff --git a/www/js/softkeyboard.js b/www/js/softkeyboard.js deleted file mode 100644 index 9b71d46..0000000 --- a/www/js/softkeyboard.js +++ /dev/null @@ -1,34 +0,0 @@ -(function( cordova ) { - - function SoftKeyBoard() {} - - SoftKeyBoard.prototype.show = function(win, fail) { - return cordova.exec( - function (args) { if(win !== undefined) { win(args); } }, - function (args) { if(fail !== undefined) { fail(args); } }, - "SoftKeyBoard", "show", []); - }; - - SoftKeyBoard.prototype.hide = function(win, fail) { - return cordova.exec( - function (args) { if(win !== undefined) { win(args); } }, - function (args) { if(fail !== undefined) { fail(args); } }, - "SoftKeyBoard", "hide", []); - }; - - SoftKeyBoard.prototype.isShowing = function(win, fail) { - return cordova.exec( - function (args) { if(win !== undefined) { win(args); } }, - function (args) { if(fail !== undefined) { fail(args); } }, - "SoftKeyBoard", "isShowing", []); - }; - - if(!window.plugins) { - window.plugins = {}; - } - - if (!window.plugins.SoftKeyBoard) { - window.plugins.SoftKeyBoard = new SoftKeyBoard(); - } - -})( window.cordova ); diff --git a/www/js/views/fms.js b/www/js/views/fms.js index 1b51a27..6ff569b 100644 --- a/www/js/views/fms.js +++ b/www/js/views/fms.js @@ -69,8 +69,7 @@ navigate: function( route, reverse ) { if ( FMS.isAndroid ) { - var softkeyboard = window.plugins.SoftKeyBoard; - softkeyboard.hide(); + cordova.plugins.Keyboard.close(); } if ( reverse ) { FMS.router.reverseTransition(); -- cgit v1.2.3