From a8ce7df649cb1a6c2ad0fa9ad0626ee0f7eb3feb Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 3 Feb 2023 15:19:08 -0800 Subject: [PATCH] notifications: Avoid misleading href on scroll to bottom notice. --- static/js/notifications.js | 5 +++-- static/templates/compose_banner/message_sent_banner.hbs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/static/js/notifications.js b/static/js/notifications.js index b44755c88a..e10e480127 100644 --- a/static/js/notifications.js +++ b/static/js/notifications.js @@ -612,7 +612,6 @@ export function notify_local_mixes(messages, need_user_to_scroll) { let reason = get_local_notify_mix_reason(message); - const above_composebox_narrow_url = get_above_composebox_narrow_url(message); const link_msg_id = message.id; if (!reason) { @@ -622,7 +621,8 @@ export function notify_local_mixes(messages, need_user_to_scroll) { notify_above_composebox( reason, "compose_notification_scroll_to_message", - above_composebox_narrow_url, + // Don't display a URL on hover for the "Scroll to bottom" link. + null, link_msg_id, link_text, ); @@ -634,6 +634,7 @@ export function notify_local_mixes(messages, need_user_to_scroll) { continue; } + const above_composebox_narrow_url = get_above_composebox_narrow_url(message); const link_class = "compose_notification_narrow_by_topic"; const link_text = $t( {defaultMessage: "Narrow to {message_recipient}"}, diff --git a/static/templates/compose_banner/message_sent_banner.hbs b/static/templates/compose_banner/message_sent_banner.hbs index 7edf0bfbe5..ba074e5dce 100644 --- a/static/templates/compose_banner/message_sent_banner.hbs +++ b/static/templates/compose_banner/message_sent_banner.hbs @@ -1,4 +1,4 @@
- {{note}} {{#if link_class}}{{link_text}}{{/if}} + {{note}} {{#if link_class}}{{link_text}}{{/if}}