user_card_popover: Add LONG_HOVER_DELAY delay to user card tooltips.

This adds the `LONG_HOVER_DELAY` delay to the user card tooltips, which
prevent the tooltips from becoming distracting when the user is just
navigating the popover.
This commit is contained in:
Sayam Samal
2024-07-23 15:32:04 +05:30
committed by Tim Abbott
parent f124ef931d
commit cd8aa727ce
3 changed files with 17 additions and 7 deletions

View File

@@ -602,9 +602,19 @@ export function initialize(): void {
});
tippy.delegate("body", {
target: [".personal-menu-clear-status", ".user-card-clear-status-button"].join(","),
target: [
".custom-profile-field-value",
".copy-custom-profile-field-link",
"#popover-menu-copy-email",
".personal-menu-clear-status",
".user-card-clear-status-button",
].join(","),
placement: "top",
delay: LONG_HOVER_DELAY,
appendTo: () => document.body,
onHidden(instance: tippy.Instance) {
instance.destroy();
},
});
tippy.delegate("body", {