fix the scrolling in the chat messages box

This commit is contained in:
Connor Turland 2016-01-22 16:49:50 +13:00
parent 5d838303a8
commit 74d372b942

View file

@ -260,12 +260,8 @@ Metamaps.Views.chatView = (function () {
chatView.prototype.scrollMessages = function(duration) {
duration = duration || 0;
var
numMessages = this.$messages.find('.chat-message').length,
messageHeight = 52;
this.$messages.animate({
scrollTop: numMessages * messageHeight
scrollTop: this.$messages[0].scrollHeight
}, duration);
}