css: Fix edit icon bug in user profile modal.

Close user profile modal on clicking the space around edit button, by
calling hide_user_profile() on clicking the hover box around the edit
button.

Also, modified the hover box to center around the edit button.
This commit is contained in:
SameepAher 2023-02-11 15:36:47 +05:30 committed by Tim Abbott
parent 4508fb5d5c
commit 724af12cd6
3 changed files with 8 additions and 3 deletions

View File

@ -358,7 +358,7 @@ export function register_click_handlers() {
/* 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 #name #edit-button", () => {
$("body").on("click", "#user-profile-modal #name .user_profile_edit_button", () => {
hide_user_profile();
});

View File

@ -428,9 +428,14 @@ ul {
}
}
.user_profile_edit_button {
margin-left: 10px;
width: 25px;
text-align: center;
}
#edit-button {
font-size: 18px;
margin-left: 10px;
}
#default-section {

View File

@ -11,7 +11,7 @@
<i class="zulip-icon zulip-icon-bot" aria-hidden="true"></i>
{{/if}}
{{#if is_me}}
<a href="/#settings/profile">
<a href="/#settings/profile" class="user_profile_edit_button">
<i class="fa fa-edit" id="edit-button" aria-hidden="true"></i>
</a>
{{/if}}