Fixup auto-expand

* Fix a css bug preventing bottom bar from sticking to the bottom.
* Resize discussion container as a function of the overall window
  height. The previous difference-based method gives the wrong result
  when the window height changes but the bottom-bar height stays the
  same.

// FREEBIE
This commit is contained in:
lilia 2015-06-24 12:10:53 -07:00
parent b80706089c
commit 7d568b5092
4 changed files with 5 additions and 7 deletions

View file

@ -213,14 +213,12 @@
}
var $discussionContainer = this.$('.discussion-container'),
$discussionContainerPrevHeight = $discussionContainer.outerHeight(),
$bottomBar = this.$('.bottom-bar'),
$bottomBarPrevHeight = $bottomBar.outerHeight();
$bottomBar = this.$('.bottom-bar');
window.autosize(this.$messageField);
$bottomBar.outerHeight(this.$messageField.outerHeight() + 1);
var $bottomBarNewHeight = $bottomBar.outerHeight();
$discussionContainer.outerHeight($discussionContainerPrevHeight - ($bottomBarNewHeight - $bottomBarPrevHeight));
$discussionContainer.outerHeight(this.$el.outerHeight() - $bottomBarNewHeight - this.$('#header').outerHeight());
},
forceUpdateMessageFieldSize: function (event) {