diff --git a/js/views/message_list_view.js b/js/views/message_list_view.js index 2cbf46312..f39506fe3 100644 --- a/js/views/message_list_view.js +++ b/js/views/message_list_view.js @@ -48,7 +48,12 @@ this.$el.scrollTop(this.scrollPosition - this.$el.outerHeight()); }, scrollToBottomIfNeeded: function() { - if (!this.atBottom()) { + // This is counter-intuitive. Our current bottomOffset is reflective of what + // we last measured, not necessarily the current state. And this is called + // after we just made a change to the DOM: inserting a message, or an image + // finished loading. So if we were near the bottom before, we _need_ to be + // at the bottom again. So we scroll to the bottom. + if (this.atBottom()) { this.scrollToBottom(); } },