mirror of https://github.com/zulip/zulip.git
popovers: Use e.currentTarget for .view_user_profile event listener.
The previous version with e.target would give the element that was clicked lying inside an element with '.view_user_profile'. One would usually expect "data-user-id" to be attached to the same element with ".view_user_profile" instead of any of its children. So, to just look for "data-user-id" in the element with that class, instead of any of its chidren, this commit changes e.target to e.currentTarget.
This commit is contained in:
parent
43fb872f3f
commit
63d71ecb0c
|
@ -974,7 +974,7 @@ export function register_click_handlers() {
|
|||
});
|
||||
|
||||
$("body").on("click", ".view_user_profile", (e) => {
|
||||
const user_id = Number.parseInt($(e.target).attr("data-user-id"), 10);
|
||||
const user_id = Number.parseInt($(e.currentTarget).attr("data-user-id"), 10);
|
||||
const user = people.get_by_user_id(user_id);
|
||||
show_user_info_popover(e.target, user);
|
||||
e.stopPropagation();
|
||||
|
|
Loading…
Reference in New Issue