From 544e472ec339c287a0091663a86e67f32e20cb4e Mon Sep 17 00:00:00 2001 From: Ganesh Pawar Date: Tue, 26 Jul 2022 16:38:43 +0530 Subject: [PATCH] user profile modal: Don't close settings when opening modal. Fixes #22572. --- static/js/settings_account.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/static/js/settings_account.js b/static/js/settings_account.js index 2a4d20b57d..5ead762aff 100644 --- a/static/js/settings_account.js +++ b/static/js/settings_account.js @@ -718,12 +718,12 @@ export function set_up() { }); }); - $("#show_my_user_profile_modal").on("click", () => { - overlays.close_overlay("settings"); + $("#show_my_user_profile_modal").on("click", (e) => { + e.stopPropagation(); + e.preventDefault(); + const user = people.get_by_user_id(people.my_current_user_id()); - setTimeout(() => { - user_profile.show_user_profile(user); - }, 100); + user_profile.show_user_profile(user); }); function upload_avatar($file_input) {