Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
portico-header: Fix navbar user dropdown not working.
Aman Agrawal2553858c91ff
diff --git a/web/src/portico/header.ts b/web/src/portico/header.tsindex c7ecf0db673..887d0ae78ec 100644--- a/web/src/portico/header.ts+++ b/web/src/portico/header.ts@@ -80,4 +80,21 @@ $(() => {document.body.classList.remove("_full-height-no-scroll");}});++ /* Used by navbar of non-corporate URLs. */+ $(".portico-header li.logout").on("click", () => {+ $("#logout_form").trigger("submit");+ return false;+ });++ $(".dropdown").on("click", (e) => {+ const $this = $(e.target);+ const dropdown_is_shown = $this.closest(".dropdown").hasClass("show");++ if (!dropdown_is_shown) {+ $this.closest(".dropdown").addClass("show");+ } else if (dropdown_is_shown) {+ $this.closest(".dropdown").removeClass("show");+ }+ });});