mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 15:09:34 +00:00
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:
@@ -532,8 +532,8 @@ export function initialize() {
|
|||||||
const title_data = buddy_data.get_title_data(user_id_string, false);
|
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.
|
// `target_node` is the `ul` element since it stays in DOM even after updates.
|
||||||
function get_target_node(tippy_instance) {
|
function get_target_node() {
|
||||||
return $(tippy_instance.reference).parents("ul").get(0);
|
return document.querySelector("#user_presences");
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_reference_removed(mutation, instance) {
|
function check_reference_removed(mutation, instance) {
|
||||||
|
|||||||
Reference in New Issue
Block a user