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
pull/749/head
lilia 10 years ago
parent b80706089c
commit 7d568b5092

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

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

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

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save