Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
left_sidebar: Stop event propagation on DM filter click.
Shubham Padiaa2f2b52c2d06
diff --git a/web/src/click_handlers.js b/web/src/click_handlers.jsindex ace2eda075c..61ce74c12f3 100644--- a/web/src/click_handlers.js+++ b/web/src/click_handlers.js@@ -774,13 +774,14 @@ export function initialize() {e.preventDefault();e.stopPropagation();- if (!$(e.target).hasClass("direct-messages-list-filter")) {- // Avoiding having clicks on the filter input.- //- // TODO: Refactor to use more precise selectors for this- // click handler in general; this is a fragile pattern.- window.location.hash = "narrow/is/dm";- }+ window.location.hash = "narrow/is/dm";+ });++ $("body").on("click", ".direct-messages-list-filter", (e) => {+ // We don't want clicking on the filter to trigger the DM+ // narrow defined on click for+ // `#direct-messages-section-header.zoom-in`.+ e.stopPropagation();});// disable the draggability for left-sidebar components