tippy: Fix persistent message action tooltips on icons after blur.

When users tabs through the message action icons, they used to
persist even when the focus is not on them. We manually
destroy them on blur event since tippy has some issue with
handling elements with opacity hiding effect.
This commit is contained in:
Aman Agrawal 2022-01-25 07:05:18 +00:00 committed by Tim Abbott
parent 7ec2a2cde7
commit ec86290e2a
1 changed files with 7 additions and 0 deletions

View File

@ -151,6 +151,13 @@ export function initialize() {
},
});
$("body").on("blur", ".message_control_button", (e) => {
// Remove tooltip when user is trying to tab through all the icons.
// If user tabs slowly, tooltips are displayed otherwise they are
// distroyed before they can be displayed.
e.currentTarget._tippy.destroy();
});
delegate("body", {
target: ".message_table .message_time",
appendTo: () => document.body,