scroll-to-bottom: Fix misclicks to scroll to bottom button.

Scroll to bottom button is visible for a few ms when switching
narrow to Inbox / Recent view while scrolling in message feed.
While we can end the transition faster to completely avoid the issue
for now but this seems like a more permanent and simpler fix
than to fiddle with CSS.

(cherry picked from commit a43c0693b7)
This commit is contained in:
Aman Agrawal 2024-07-26 16:53:07 +00:00 committed by Tim Abbott
parent 57d4118583
commit 6c74726b12
1 changed files with 5 additions and 1 deletions

View File

@ -285,7 +285,11 @@ export function initialize() {
e.preventDefault();
e.stopPropagation();
navigate.to_end();
// Since it take a few milliseconds for this button complete disappear transition,
// it is possible for user to click it before it hides when switching narrows.
if (narrow_state.is_message_feed_visible()) {
navigate.to_end();
}
});
$("body").on("click", ".message_row", function () {