From c9474376101116c414a48846af0360a953fabff0 Mon Sep 17 00:00:00 2001 From: Ibrahim Hadeed Date: Thu, 24 Mar 2016 14:22:39 -0400 Subject: [PATCH] feat(keyboard): add event listeners for keyboard show/hide events --- src/plugins/keyboard.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/plugins/keyboard.ts b/src/plugins/keyboard.ts index fa96cde6..b6720ee9 100644 --- a/src/plugins/keyboard.ts +++ b/src/plugins/keyboard.ts @@ -58,6 +58,24 @@ export class Keyboard { }) static disableScroll(disable : boolean) : void {} + /** + * Creates an observable that notifies you when the keyboard is shown. Unsubscribe to observable to cancel event watch. + * @platforms ['iOS','Android','BlackBerry 10','Windows'] + */ + @Cordova({ + eventObservable: true, + event: 'native.keyboardshow' + }) + static onKeybardShow() : Observable {return} + /** + * Creates an observable that notifies you when the keyboard is hidden. Unsubscribe to observable to cancel event watch. + * @platforms ['iOS','Android','BlackBerry 10','Windows'] + */ + @Cordova({ + eventObservable: true, + event: 'native.keyboardhide' + }) + static onKeybardHide() : Observable {return} } \ No newline at end of file