From 944ae296ebbf630f8c63a2bdf2da0a02cc576050 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Wed, 31 May 2017 09:48:47 -0700 Subject: [PATCH] Prevent 'mark read on scroll' during fetches FREEBIE --- js/views/conversation_view.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index 95c8b19719..a884771e82 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -208,7 +208,10 @@ }, onLazyScroll: function() { - if (!this.isHidden() && window.isFocused()) { + // The in-progress fetch check is important, because while that happens, lots + // of messages are added to the DOM, one by one, changing window size and + // generating scroll events. + if (!this.isHidden() && window.isFocused() && !this.inProgressFetch) { this.markRead(); } },