activity: Hide right sidebar when narrowing to a user via enter press.

Fixes #26989
This commit is contained in:
Aman Agrawal 2023-10-03 09:47:28 +00:00 committed by Tim Abbott
parent 35b854131e
commit d3588c7559
2 changed files with 3 additions and 0 deletions

View File

@ -13,6 +13,7 @@ import * as people from "./people";
import * as pm_list from "./pm_list";
import * as popovers from "./popovers";
import * as presence from "./presence";
import * as sidebar_ui from "./sidebar_ui";
import * as ui_util from "./ui_util";
import {UserSearch} from "./user_search";
import * as util from "./util";
@ -289,6 +290,7 @@ function keydown_enter_key() {
}
narrow_for_user_id({user_id});
sidebar_ui.hide_all();
popovers.hide_all();
}

View File

@ -280,6 +280,7 @@ test("handlers", ({override, mock_template}) => {
override(scroll_util, "scroll_element_into_container", () => {});
override(padded_widget, "update_padding", () => {});
override(popovers, "hide_all", () => {});
override(sidebar_ui, "hide_all", () => {});
override(sidebar_ui, "show_userlist_sidebar", () => {});
override(resize, "resize_sidebars", () => {});