compose: Leave scroll-to-message banner open until explicitly closed.

Previously the message would disappear after 300ms, but it can be
annoying for a useful link to disappear so quickly like that.

This commit removes that logic. Now the banner is closed only when
the user explicitly closes it or clicks on the link.

Note that the banner doesn't go away if the user manually scrolls
down. I still think this change is overall better, but if there's
an easy way to add that as well we should do it!

Fixes part of #19857.
This commit is contained in:
evykassirer
2022-12-15 14:26:59 -08:00
committed by Tim Abbott
parent fbad0b273b
commit e789e7aa4f

View File

@@ -624,9 +624,6 @@ export function notify_local_mixes(messages, need_user_to_scroll) {
link_msg_id,
link_text,
);
setTimeout(() => {
$("#out-of-view-notification").hide();
}, 3000);
}
// This is the HAPPY PATH--for most messages we do nothing
@@ -718,6 +715,7 @@ export function register_click_handlers() {
const message_id = $(e.currentTarget).data("message-id");
message_lists.current.select_id(message_id);
navigate.scroll_to_selected();
$("#out-of-view-notification").hide();
e.stopPropagation();
e.preventDefault();
});