mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
user-card-tooltip: Open user card when user-card-tooltip visible.
Without hovering on the name or profile picture user-card-tooltip was visible but on_click user card does not open. To fix it message-avatar class is added in the register_click_handlers function.
This commit is contained in:
@@ -661,19 +661,15 @@ function toggle_sidebar_user_card_popover($target: JQuery): void {
|
||||
}
|
||||
|
||||
function register_click_handlers(): void {
|
||||
$("#main_div").on(
|
||||
"click",
|
||||
".sender_name, .inline_profile_picture",
|
||||
function (this: HTMLElement, e) {
|
||||
const $row = $(this).closest(".message_row");
|
||||
e.stopPropagation();
|
||||
assert(message_lists.current !== undefined);
|
||||
const message = message_lists.current.get(rows.id($row));
|
||||
assert(message !== undefined);
|
||||
const user = people.get_by_user_id(message.sender_id);
|
||||
toggle_user_card_popover_for_message(this, user, message.sender_id, true);
|
||||
},
|
||||
);
|
||||
$("#main_div").on("click", ".sender_name, .message-avatar", function (this: HTMLElement, e) {
|
||||
const $row = $(this).closest(".message_row");
|
||||
e.stopPropagation();
|
||||
assert(message_lists.current !== undefined);
|
||||
const message = message_lists.current.get(rows.id($row));
|
||||
assert(message !== undefined);
|
||||
const user = people.get_by_user_id(message.sender_id);
|
||||
toggle_user_card_popover_for_message(this, user, message.sender_id, true);
|
||||
});
|
||||
|
||||
$("#main_div").on("click", ".user-mention", function (this: HTMLElement, e) {
|
||||
const id_string = $(this).attr("data-user-id");
|
||||
|
||||
Reference in New Issue
Block a user