mirror of
https://github.com/zulip/zulip.git
synced 2025-10-25 17:14:02 +00:00
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:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user