Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

user_profile: Fix hide modal on stream/group item link narrow.

Pratik Chandaa4dfb80dfc12
diff --git a/web/src/user_profile.ts b/web/src/user_profile.ts
index 11985688bca..880fad77b2d 100644
--- a/web/src/user_profile.ts
+++ b/web/src/user_profile.ts
@@ -1452,22 +1452,22 @@ export function initialize(): void {
e.preventDefault();
});
- $("body").on("click", "#user-profile-modal #name .user-profile-profile-settings-button", () => {
- browser_history.go_to_location("#settings/profile");
- hide_user_profile();
- });
-
/* These click handlers are implemented as just deep links to the
* relevant part of the Zulip UI, so we don't want preventDefault,
* but we do want to close the modal when you click them. */
- $("body").on("click", "#user-profile-modal .user-profile-channel-list-item", () => {
+ $("body").on("click", "#user-profile-modal #name .user-profile-profile-settings-button", () => {
+ browser_history.go_to_location("#settings/profile");
hide_user_profile();
});
- $("body").on("click", "#user-profile-modal .group_list_item_link", () => {
- hide_user_profile();
- });
+ $("body").on(
+ "click",
+ "#user-profile-modal .user-profile-channel-row, .user-profile-group-row",
+ () => {
+ hide_user_profile();
+ },
+ );
bot_helper.initialize_bot_click_handlers();