Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
hashchange: Fix `near` link not working if already narrowed to it.
Aman Agrawal6a44364a69e5
diff --git a/web/src/hashchange.ts b/web/src/hashchange.tsindex f695a8b0ef7..ffb84633f2d 100644--- a/web/src/hashchange.ts+++ b/web/src/hashchange.ts@@ -562,9 +562,8 @@ export function initialize(): void {hashchanged(true);$("body").on("click", "a", function (this: HTMLAnchorElement, e: JQuery.ClickEvent) {- const href = this.href;- if (href === window.location.hash && href.includes("/near/")) {- // The clicked on a link, perhaps a "said" reference, that+ if (this.hash === window.location.hash && this.hash.includes("/near/")) {+ // User clicked on a link, perhaps a "said" reference, that// matches the current view. Such a click doesn't trigger// a hashchange event, so we manually trigger one in order// to ensure the app scrolls to the correct message.