Tag selector: Show truncated tags in tooltip on hover

This commit is contained in:
Dan Stillman 2019-05-02 18:35:53 -04:00
parent 17aca346c6
commit d3bf704cf3

View file

@ -139,6 +139,13 @@ class TagList extends React.PureComponent {
if (props.style.width < tagMaxWidth) {
delete props.style.width;
}
else {
// Setting this via props doesn't seem to work in XUL, but setting it on hover does.
// Hopefully in an HTML window we'll be able to just set 'title'.
props.onMouseOver = function (event) {
event.target.setAttribute('tooltiptext', tag.name);
};
}
if (tag.color) {
props.style.color = tag.color;