code: function keyboardFocusOut() {
    clearTimeout(keyboardFocusOutTimer);
    //console.log("keyboardFocusOut fired at: " + Date.now());
    //console.log("keyboardFocusOut event type: " + e.type);
  
    if (ionic.keyboard.isOpen || ionic.keyboard.isOpening) {
      ionic.keyboard.isClosing = true;
      ionic.keyboard.isOpening = false;
    }
  
    // Call keyboardHide with a slight delay because sometimes on focus or
    // orientation change focusin is called immediately after, so we give it time
    // to cancel keyboardHide
    keyboardFocusOutTimer = setTimeout(function() {
      ionic.requestAnimationFrame(function() {
        // focusOut during or right after an orientationchange, so we didn't get
        // a chance to update the viewport height yet, do it and keyboardHide
        //console.log("focusOut, wasOrientationChange: " + wasOrientationChange);
        if (wasOrientationChange) {
          keyboardWaitForResize(function(){
            keyboardUpdateViewportHeight();
            keyboardHide();
          }, false);
        } else {
          keyboardWaitForResize(keyboardHide, false);
        }
      });
    }, 50);
  }
docs: Event handler for 'focusout' events. Sets keyboard.isClosing to true and
  calls keyboardWaitForResize with keyboardHide as the callback after a small
  timeout.