Fix for message box auto-sizing behavior on resize; menu z-index fix

This commit is contained in:
adambar 2015-06-19 22:43:24 +02:00
parent da1abd75bf
commit 9c563cf080
4 changed files with 11 additions and 3 deletions

View file

@ -52,6 +52,8 @@
this.$('.discussion-container').append(this.view.el); this.$('.discussion-container').append(this.view.el);
this.view.render(); this.view.render();
this.appWindow.contentWindow.addEventListener('resize', this.forceUpdateMessageFieldSize.bind(this));
setTimeout(function() { setTimeout(function() {
this.view.scrollToBottom(); this.view.scrollToBottom();
}.bind(this), 10); }.bind(this), 10);
@ -172,8 +174,7 @@
convo.sendMessage(message, attachments); convo.sendMessage(message, attachments);
}); });
input.val(""); input.val("");
window.autosize.update(input); this.forceUpdateMessageFieldSize(e);
this.updateMessageFieldSize(e);
this.fileInput.deleteFiles(); this.fileInput.deleteFiles();
} }
}, },
@ -213,6 +214,11 @@
$bottomBar.outerHeight($messageField.outerHeight() + 1); $bottomBar.outerHeight($messageField.outerHeight() + 1);
var $bottomBarNewHeight = $bottomBar.outerHeight(); var $bottomBarNewHeight = $bottomBar.outerHeight();
$discussionContainer.outerHeight($discussionContainerPrevHeight - ($bottomBarNewHeight - $bottomBarPrevHeight)); $discussionContainer.outerHeight($discussionContainerPrevHeight - ($bottomBarNewHeight - $bottomBarPrevHeight));
},
forceUpdateMessageFieldSize: function (event) {
window.autosize.update(this.$('.send-message'));
this.updateMessageFieldSize(event);
} }
}); });
})(); })();

View file

@ -98,6 +98,7 @@ button.back {
display: none; display: none;
position: absolute; position: absolute;
color: $grey_d; color: $grey_d;
z-index: 1;
top: 100%; top: 100%;
left: 0; left: 0;

View file

@ -95,6 +95,7 @@ button.back {
display: none; display: none;
position: absolute; position: absolute;
color: #454545; color: #454545;
z-index: 1;
top: 100%; top: 100%;
left: 0; left: 0;
margin: 0; margin: 0;

File diff suppressed because one or more lines are too long