left_sidebar: Fix sidebar hidden on clicking stream / topic popover.

This commit is contained in:
emmawitt 2023-11-29 14:14:51 +01:00 committed by Aman Agrawal
parent ed5e0fa141
commit 51285cb387
1 changed files with 5 additions and 3 deletions

View File

@ -151,9 +151,11 @@ export function initialize(): void {
left_sidebar_expanded_as_overlay && left_sidebar_expanded_as_overlay &&
!$elt.closest(".no-auto-hide-left-sidebar-overlay").length !$elt.closest(".no-auto-hide-left-sidebar-overlay").length
) { ) {
const $left_column = $(".app-main .column-left"); const click_outside_left_sidebar = !$elt.closest(".app-main .column-left").length;
const click_outside_left_sidebar = !$elt.closest($left_column).length; // Don't close sidebar if user is interacting with a popover.
if (click_outside_left_sidebar) { const click_outside_popover = !$elt.closest(".popover-menu").length;
if (click_outside_left_sidebar && click_outside_popover) {
hide_streamlist_sidebar(); hide_streamlist_sidebar();
} }
} }