B2G/gaia/apps/sms/js/thread_ui.js
// grows larger than the space available.
grows larger than the space available.
grows larger than the space available .
function thui_setInputMaxHeight() {
    var viewHeight;
    var threadSliverHeight = 30;
    var adjustment =
      this.subheader.offsetHeight +
      this.INPUT_MARGIN;
    if (window.location.hash !== '#new') {
      adjustment += threadSliverHeight;
    }
    this.container.style.borderBottomWidth = null;
    viewHeight = this.container.offsetHeight;
    this.input.style.maxHeight = (viewHeight - adjustment) + 'px';
  }
function thui_setInputMaxHeight ( ) { var viewHeight ; var threadSliverHeight = 30 ; var adjustment = this . subheader . offsetHeight + this . INPUT_MARGIN ; if ( window . location . hash !== '#new' ) { adjustment += threadSliverHeight ; } this . container . style . borderBottomWidth = null ; viewHeight = this . container . offsetHeight ; this . input . style . maxHeight = ( viewHeight - adjustment ) + 'px' ; }
grows larger than the space available.
grows larger than the space available .
// The max height should be constrained by the following factors: // The height of the absolutely-position sub-header element // the vertical margin of the input field // Further constrain the max height by an artificial spacing to prevent the // input field from completely occluding the message thread (not necessary // when creating a new thread). // when the border bottom is bigger than the available space, then // offsetHeight is also too big, and as a result we can't calculate the max // height. So we nullify the border bottom width before getting the offset // height. // TODO: we should find something better than that because this probably // triggers a synchronous workflow (bug 891029).