Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

notifications: Avoid misleading href on scroll to bottom notice.

Tim Abbotta8ce7df649cb
diff --git a/static/js/notifications.js b/static/js/notifications.js
index b44755c88a0..e10e4801273 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 7edf0bfbe5e..ba074e5dce5 100644
--- a/static/templates/compose_banner/message_sent_banner.hbs
+++ b/static/templates/compose_banner/message_sent_banner.hbs
@@ -1,4 +1,4 @@
<div class="compose-notifications-content">
- {{note}} {{#if link_class}}<a href="{{above_composebox_narrow_url}}" class="{{link_class}}" data-message-id="{{link_msg_id}}">{{link_text}}</a>{{/if}}
+ {{note}} {{#if link_class}}<a {{#if above_composebox_narrow_url}}href="{{above_composebox_narrow_url}}"{{/if}} class="{{link_class}}" data-message-id="{{link_msg_id}}">{{link_text}}</a>{{/if}}
<button type="button" class="out-of-view-notification-close close">&times;</button>
</div>