left_sidebar: Explicitly handle clicks on collapsible Views targets.

This commit is contained in:
Karl Stolley 2023-11-13 11:05:14 -06:00 committed by Tim Abbott
parent 8ad2e10cfe
commit 690b4efca8
1 changed files with 8 additions and 11 deletions

View File

@ -191,15 +191,12 @@ export function handle_home_view_changed(new_home_view) {
export function initialize() { export function initialize() {
update_scheduled_messages_row(); update_scheduled_messages_row();
$("body").on("click", "#views-label-container", (e) => { $("body").on(
if ( "click",
$(e.currentTarget).hasClass("showing-condensed-navigation") && "#toggle-top-left-navigation-area-icon, #views-label-container .left-sidebar-title",
!($(e.target).hasClass("left-sidebar-title") || $(e.target).hasClass("fa-caret-right")) (e) => {
) { e.stopPropagation();
// Ignore clicks on condensed nav items toggle_condensed_navigation_area();
return; },
} );
e.stopPropagation();
toggle_condensed_navigation_area();
});
} }