From 4478f8cc55f0c13a83cec04929799e2adf456d95 Mon Sep 17 00:00:00 2001 From: Lakshay Mittal Date: Thu, 30 Mar 2023 15:21:39 +0530 Subject: [PATCH] local echo: Fix tooltip over locally echoed spinner. Despite the timestamp being hidden while sending the message, the link on the timestamp (message url) was still hoverable and clickable, and had a tooltip. Here we disable the tooltip, but https://github.com/zulip/zulip/issues/25069 remains open for the link part. --- web/src/tippyjs.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/src/tippyjs.js b/web/src/tippyjs.js index 326629383b..fdab4bd736 100644 --- a/web/src/tippyjs.js +++ b/web/src/tippyjs.js @@ -220,8 +220,13 @@ export function initialize() { const $time_elem = $(instance.reference); const $row = $time_elem.closest(".message_row"); const message = message_lists.current.get(rows.id($row)); + // Don't show time tooltip for locally echoed message. + if (message.locally_echoed) { + return false; + } const time = new Date(message.timestamp * 1000); instance.setContent(timerender.get_full_datetime(time)); + return true; }, onHidden(instance) { instance.destroy();