From 9cb9e74a21d7f539f38c89317166c3538410fec3 Mon Sep 17 00:00:00 2001 From: Riron Date: Tue, 8 Sep 2015 19:10:49 +0200 Subject: [PATCH 1/2] Ionic Keyboard plugin: Add show() method --- cordova-ionic/plugins/keyboard.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cordova-ionic/plugins/keyboard.d.ts b/cordova-ionic/plugins/keyboard.d.ts index 4ff9e293d..7a1cd38e1 100644 --- a/cordova-ionic/plugins/keyboard.d.ts +++ b/cordova-ionic/plugins/keyboard.d.ts @@ -17,6 +17,14 @@ declare module Ionic { * Close the keyboard if it is open. */ close(): void; + + /** + * Force keyboard to be shown on Android. + * This typically helps if autofocus on a text element does not pop up the keyboard automatically + * + * Supported Platforms: Android, Blackberry 10 + */ + show(): void; /** * Disable native scrolling, useful if you are using JavaScript to scroll From 8e62889ba3e00c7c22807241411e18f6189eb1b1 Mon Sep 17 00:00:00 2001 From: Riron Date: Tue, 8 Sep 2015 19:15:48 +0200 Subject: [PATCH 2/2] Ionic Keyboard plugin: Update test --- cordova-ionic/cordova-ionic-tests.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cordova-ionic/cordova-ionic-tests.ts b/cordova-ionic/cordova-ionic-tests.ts index 69d1a3d82..a88c9c580 100644 --- a/cordova-ionic/cordova-ionic-tests.ts +++ b/cordova-ionic/cordova-ionic-tests.ts @@ -7,4 +7,6 @@ cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false); cordova.plugins.Keyboard.close(); cordova.plugins.Keyboard.disableScroll(true); cordova.plugins.Keyboard.disableScroll(false); +cordova.plugins.Keyboard.show(); +cordova.plugins.Keyboard.close(); console.log(cordova.plugins.Keyboard.isVisible);