From 73f2a4a0fbeb53f29a2da9e10cf91d1b128c4ddc Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Wed, 17 May 2017 14:34:55 -0700 Subject: [PATCH] Simplify MessageListView.resetScrollPosition: no translation math FREEBIE --- js/views/message_list_view.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/js/views/message_list_view.js b/js/views/message_list_view.js index 386fad810..34e85a79c 100644 --- a/js/views/message_list_view.js +++ b/js/views/message_list_view.js @@ -33,11 +33,7 @@ } }, resetScrollPosition: function() { - var scrollPosition = this.scrollPosition; - if (this.scrollHeight !== this.el.scrollHeight) { - scrollPosition = this.el.scrollHeight * this.scrollPosition / this.scrollHeight; - } - this.$el.scrollTop(scrollPosition - this.$el.outerHeight()); + this.$el.scrollTop(this.scrollPosition - this.$el.outerHeight()); }, scrollToBottomIfNeeded: function() { if (this.bottomOffset === 0) {