mirror of https://github.com/zulip/zulip.git
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.
This commit is contained in:
parent
e86fe4e57c
commit
4478f8cc55
|
@ -220,8 +220,13 @@ export function initialize() {
|
||||||
const $time_elem = $(instance.reference);
|
const $time_elem = $(instance.reference);
|
||||||
const $row = $time_elem.closest(".message_row");
|
const $row = $time_elem.closest(".message_row");
|
||||||
const message = message_lists.current.get(rows.id($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);
|
const time = new Date(message.timestamp * 1000);
|
||||||
instance.setContent(timerender.get_full_datetime(time));
|
instance.setContent(timerender.get_full_datetime(time));
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
onHidden(instance) {
|
onHidden(instance) {
|
||||||
instance.destroy();
|
instance.destroy();
|
||||||
|
|
Loading…
Reference in New Issue