Skip to content

Commit

Permalink
docs(keyboard): clarify hide on keyboard open
Browse files Browse the repository at this point in the history
  • Loading branch information
tlancina committed Jun 11, 2015
1 parent f622817 commit 78c0814
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions js/utils/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@
* <div id="google-map"></div>
* </div>
* ```
*
* 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
Expand Down

0 comments on commit 78c0814

Please sign in to comment.