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).
This commit is contained in:
N-Shar-ma 2023-03-24 23:24:41 +05:30 committed by Tim Abbott
parent 1db7f80f94
commit b8cb72630f
1 changed files with 1 additions and 0 deletions

View File

@ -872,6 +872,7 @@ export function initialize() {
!$(e.target).closest(".popover").length && !$(e.target).closest(".popover").length &&
!$(e.target).closest(".micromodal").length && !$(e.target).closest(".micromodal").length &&
!$(e.target).closest("[data-tippy-root]").length && !$(e.target).closest("[data-tippy-root]").length &&
!$(e.target).closest(".typeahead").length &&
!$(e.target).closest(".enter_sends").length && !$(e.target).closest(".enter_sends").length &&
$(e.target).closest("body").length $(e.target).closest("body").length
) { ) {