buddy_list_tooltip: Directly get target node.

On mobile, the tooltip is triggered at the same time when right
sidebar is hidden when user clicks on a user name in the buddy
list. So, `instance.reference` node no longer exists in DOM.
This commit is contained in:
Aman Agrawal
2023-04-06 06:18:58 +00:00
committed by Tim Abbott
parent 915084fe82
commit 13e0986091

View File

@@ -532,8 +532,8 @@ export function initialize() {
const title_data = buddy_data.get_title_data(user_id_string, false);
// `target_node` is the `ul` element since it stays in DOM even after updates.
function get_target_node(tippy_instance) {
return $(tippy_instance.reference).parents("ul").get(0);
function get_target_node() {
return document.querySelector("#user_presences");
}
function check_reference_removed(mutation, instance) {