From b8cb72630f36cd7d1d7975a16e04fd0db570db9e Mon Sep 17 00:00:00 2001 From: N-Shar-ma Date: Fri, 24 Mar 2023 23:24:41 +0530 Subject: [PATCH] click_handlers: Ensure typeahead clicks do not collapse compose box. Added condition for when a user clicks anywhere in a typeahead menu, be it the header or empty space at the top and bottom, to not collapse the compose box. This fixes the bug where clicking anywhere on the typeahead except the options would result in the compose box collapsing, but the typeahead menu staying open and still working (on selecting a option in this state, it would be inserted at the start, as visible on reopening the compose box). --- web/src/click_handlers.js | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/click_handlers.js b/web/src/click_handlers.js index 79f6c35504..f16b1ee774 100644 --- a/web/src/click_handlers.js +++ b/web/src/click_handlers.js @@ -872,6 +872,7 @@ export function initialize() { !$(e.target).closest(".popover").length && !$(e.target).closest(".micromodal").length && !$(e.target).closest("[data-tippy-root]").length && + !$(e.target).closest(".typeahead").length && !$(e.target).closest(".enter_sends").length && $(e.target).closest("body").length ) {