recent_conversation: Delegate profile click handling to `body`.

`#recent_topics_table` may not be present in the DOM when
this click handler is initialized which can cause this
it to not work, delegating it to body ensures it will always work.
This commit is contained in:
Aman Agrawal 2023-02-13 04:10:50 +00:00 committed by Tim Abbott
parent 4debef64e7
commit cc96be2bf9
1 changed files with 1 additions and 1 deletions

View File

@ -1216,7 +1216,7 @@ export function initialize() {
filters = new Set(ls.get(ls_key));
}
$("#recent_topics_table").on("click", ".participant_profile", function (e) {
$("body").on("click", "#recent_topics_table .participant_profile", function (e) {
const participant_user_id = Number.parseInt($(this).attr("data-user-id"), 10);
e.stopPropagation();
const user = people.get_by_user_id(participant_user_id);