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() {
update_scheduled_messages_row();
$("body").on("click", "#views-label-container", (e) => {
if (
$(e.currentTarget).hasClass("showing-condensed-navigation") &&
!($(e.target).hasClass("left-sidebar-title") || $(e.target).hasClass("fa-caret-right"))
) {
// Ignore clicks on condensed nav items
return;
}
e.stopPropagation();
toggle_condensed_navigation_area();
});
$("body").on(
"click",
"#toggle-top-left-navigation-area-icon, #views-label-container .left-sidebar-title",
(e) => {
e.stopPropagation();
toggle_condensed_navigation_area();
},
);
}