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) {

View file

@ -320,7 +320,7 @@
$button-width: 36px;
position: fixed;
bottom: 1; // offset 1 for window frame.
bottom: 1px; // offset 1 for window frame.
height: 36px;
width: calc(100% - 2px);
border-top: 1px solid $grey_l;

View file

@ -661,7 +661,7 @@ input.search {
.bottom-bar {
position: fixed;
bottom: 1;
bottom: 1px;
height: 36px;
width: calc(100% - 2px);
border-top: 1px solid #f3f3f3;

File diff suppressed because one or more lines are too long