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
+6 -1
+6 -1
View File
@@ -69,19 +69,24 @@ const component = {
); );
} }
return m( const el = m(
"span.parameter-value", "span.parameter-value",
{ {
onmouseover: e => { onmouseover: e => {
e.redraw = false; e.redraw = false;
// Don't update any child element
if (e.target === el.dom) {
const now = Date.now(); const now = Date.now();
const localeString = new Date(timestamp).toLocaleString(); const localeString = new Date(timestamp).toLocaleString();
e.target.title = `${localeString} (${timeAgo(now - timestamp)})`; e.target.title = `${localeString} (${timeAgo(now - timestamp)})`;
} }
}
}, },
value, value,
edit edit
); );
return el;
} }
}; };