From a0f42edaa2dc34e4ef2753f1476a1e40cf120089 Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Mon, 21 Nov 2022 13:03:13 +0000 Subject: [PATCH] message_scroll: Only run `scroll_finished` when RT is not visible. We didn't use to control how `active` class is set on `#message_feed_container`. It was done by bootstrap on its own and it doesn't even matter if `message_feed_container` is visible for it to have `active` class according to bootstrap. So, we only run `scroll_finished` when recent topics is not visible which seems logical. --- static/js/message_scroll.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/message_scroll.js b/static/js/message_scroll.js index 77fe797bfd..97f426e463 100644 --- a/static/js/message_scroll.js +++ b/static/js/message_scroll.js @@ -190,7 +190,7 @@ export function scroll_finished() { actively_scrolling = false; hide_scroll_to_bottom(); - if (!$("#message_feed_container").hasClass("active")) { + if (recent_topics_util.is_visible()) { return; }