diff --git a/js/utils/keyboard.js b/js/utils/keyboard.js index 2d29c99df5c..6045c567e44 100644 --- a/js/utils/keyboard.js +++ b/js/utils/keyboard.js @@ -27,6 +27,20 @@ *
* * ``` + * + * Note: For performance reasons, elements will not be hidden for 400ms after the start of the `native.keyboardshow` event + * from the Ionic Keyboard plugin. If you would like them to disappear immediately, you could do something + * like: + * + * ```js + * window.addEventListener('native.keyboardshow', function(){ + * document.body.classList.add('keyboard-open'); + * }); + * ``` + * This adds the same `keyboard-open` class that is normally added by Ionic 400ms after the keyboard + * opens. However, bear in mind that adding this class to the body immediately may cause jank in any + * animations on Android that occur when the keyboard opens (for example, scrolling any obscured inputs into view). + * * ---------- * * ### Plugin Usage