From d3bf704cf3c03400a39260c17474accb4a670e5f Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 2 May 2019 18:35:53 -0400 Subject: [PATCH] Tag selector: Show truncated tags in tooltip on hover --- chrome/content/zotero/components/tag-selector/tag-list.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chrome/content/zotero/components/tag-selector/tag-list.jsx b/chrome/content/zotero/components/tag-selector/tag-list.jsx index 837310297c..865445eef0 100644 --- a/chrome/content/zotero/components/tag-selector/tag-list.jsx +++ b/chrome/content/zotero/components/tag-selector/tag-list.jsx @@ -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;