Fix bug in param timestamp tooltip

This commit is contained in:
Zaid Abdulla committed 2018-12-27 01:21:18 -08:00
1 parent bb416d25b9
commit bae54300a7
1 file changed
+9 -4
+9 -4
View File
@@ -69,19 +69,24 @@ const component = {
);
}
return m(
const el = m(
"span.parameter-value",
{
onmouseover: e => {
e.redraw = false;
const now = Date.now();
const localeString = new Date(timestamp).toLocaleString();
e.target.title = `${localeString} (${timeAgo(now - timestamp)})`;
// Don't update any child element
if (e.target === el.dom) {
const now = Date.now();
const localeString = new Date(timestamp).toLocaleString();
e.target.title = `${localeString} (${timeAgo(now - timestamp)})`;
}
}
},
value,
edit
);
return el;
}
};