mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 10:26:28 +00:00
message-edit-tooltips: Fix the breaking tooltips on rerender.
Fixes: #35217.
This commit is contained in:
committed by
Tim Abbott
parent
6341bf192d
commit
074850ef5d
@@ -51,6 +51,8 @@ export function clean_up_compose_singleton_tooltip(context: SingletonContext): v
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function initialize_compose_tooltips(context: SingletonContext, selector: string): void {
|
export function initialize_compose_tooltips(context: SingletonContext, selector: string): void {
|
||||||
|
// Listen on body for the very first mouseenter on any element matching `selector`
|
||||||
|
$(document.body).one("mouseenter", selector, () => {
|
||||||
// Clean up existing instances first
|
// Clean up existing instances first
|
||||||
clean_up_compose_singleton_tooltip(context);
|
clean_up_compose_singleton_tooltip(context);
|
||||||
|
|
||||||
@@ -83,6 +85,7 @@ export function initialize_compose_tooltips(context: SingletonContext, selector:
|
|||||||
tooltip_instances,
|
tooltip_instances,
|
||||||
singleton_instance,
|
singleton_instance,
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function initialize(): void {
|
export function initialize(): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user