Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
compose_tooltips: Fix message edit tooltip visible without mousemove.
Aman Agrawal1d7b9ea83cc2
diff --git a/web/src/compose_tooltips.ts b/web/src/compose_tooltips.tsindex 5682ed0f352..ebb6c5adc85 100644--- a/web/src/compose_tooltips.ts+++ b/web/src/compose_tooltips.ts@@ -52,7 +52,7 @@ export function clean_up_compose_singleton_tooltip(context: SingletonContext): vexport 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, () => {+ $(document.body).one("mousemove", selector, (e) => {// Clean up existing instances firstclean_up_compose_singleton_tooltip(context);@@ -81,6 +81,11 @@ export function initialize_compose_tooltips(context: SingletonContext, selector:},});+ // Show the tooltip since user has hovered over the element.+ if (e.currentTarget instanceof HTMLElement) {+ e.currentTarget.dispatchEvent(new MouseEvent("mouseenter"));+ }+compose_button_singleton_context_map.set(context, {tooltip_instances,singleton_instance,