mirror of
https://github.com/zulip/zulip.git
synced 2025-11-19 14:08:23 +00:00
header: Fix unresponsive dropdown pill on /help pages.
My PR #18974 introduced a bug where the logged-in dropdown pill on the /help pages stopped working and has been unresponsive ever since. This was caused by the incorrect assumption that each `.dropdown` would be inside an unordered list `ul`. However, that isn't the case for the dropdown pill on the /help pages. This commit simply removes said assumption, by widening the scope of the relevant CSS selectors.
This commit is contained in:
@@ -8,12 +8,12 @@ $(() => {
|
||||
|
||||
$(".dropdown").on("click", (e) => {
|
||||
const $this = $(e.target);
|
||||
const dropdown_is_shown = $this.closest("ul .dropdown").hasClass("show");
|
||||
const dropdown_is_shown = $this.closest(".dropdown").hasClass("show");
|
||||
|
||||
if (!dropdown_is_shown) {
|
||||
$this.closest("ul .dropdown").addClass("show");
|
||||
$this.closest(".dropdown").addClass("show");
|
||||
} else if (dropdown_is_shown) {
|
||||
$this.closest("ul .dropdown").removeClass("show");
|
||||
$this.closest(".dropdown").removeClass("show");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user