diff --git a/www/android/keyboard.js b/www/android/keyboard.js index e58531d..8596964 100755 --- a/www/android/keyboard.js +++ b/www/android/keyboard.js @@ -11,11 +11,21 @@ Keyboard.fireOnShow = function (height) { cordova.fireWindowEvent('keyboardDidShow', { 'keyboardHeight': height }); + + // To support the keyboardAttach directive listening events + // inside Ionic's main bundle + cordova.fireWindowEvent('native.keyboardshow', { + 'keyboardHeight': height + }); }; Keyboard.fireOnHide = function () { Keyboard.isVisible = false; cordova.fireWindowEvent('keyboardDidHide'); + + // To support the keyboardAttach directive listening events + // inside Ionic's main bundle + cordova.fireWindowEvent('native.keyboardhide'); }; Keyboard.fireOnHiding = function () { diff --git a/www/ios/keyboard.js b/www/ios/keyboard.js index b7b148b..8912956 100644 --- a/www/ios/keyboard.js +++ b/www/ios/keyboard.js @@ -30,11 +30,21 @@ Keyboard.fireOnShow = function (height) { cordova.fireWindowEvent('keyboardDidShow', { 'keyboardHeight': height }); + + // To support the keyboardAttach directive listening events + // inside Ionic's main bundle + cordova.fireWindowEvent('native.keyboardshow', { + 'keyboardHeight': height + }); }; Keyboard.fireOnHide = function () { Keyboard.isVisible = false; cordova.fireWindowEvent('keyboardDidHide'); + + // To support the keyboardAttach directive listening events + // inside Ionic's main bundle + cordova.fireWindowEvent('native.keyboardhide'); }; Keyboard.fireOnHiding = function () {