From fce6f4ef668de1630123a937c0144c8a188f622a Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 6 Nov 2024 17:47:21 -0800 Subject: [PATCH] topic_list: Harden topic clicks against propagation. I saw some profiling traces where it appears multiple copies of this click handler got processed when clicking on a topic in the left sidebar. I suspect that was a profiling artifact, but the intent is for on_topic_click to fully process clicks on topics in the sidebar, and we should write the code to say that. --- web/src/topic_list.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/topic_list.ts b/web/src/topic_list.ts index 7fc84fa68e..eb6dc5b47e 100644 --- a/web/src/topic_list.ts +++ b/web/src/topic_list.ts @@ -359,6 +359,7 @@ export function initialize({ on_topic_click(stream_id, topic); e.preventDefault(); + e.stopPropagation(); }, );