Fix tooltips for tags box icons
Addresses #1947 If we're going to need this regularly we should just create a React Image element that does this automatically for 'title'.
This commit is contained in:
parent
01819d68d1
commit
e9e434cd2e
1 changed files with 6 additions and 2 deletions
|
@ -350,7 +350,9 @@ const TagsBox = React.forwardRef((props, ref) => {
|
||||||
src={`chrome://zotero/skin/${iconFile}${Zotero.hiDPISuffix}.png`}
|
src={`chrome://zotero/skin/${iconFile}${Zotero.hiDPISuffix}.png`}
|
||||||
alt={title}
|
alt={title}
|
||||||
title={title}
|
title={title}
|
||||||
tooltiptext={title}
|
/* Fix 'title' not working for HTML-in-XUL */
|
||||||
|
onMouseOver={() => window.Zotero_Tooltip.start(title)}
|
||||||
|
onMouseOut={() => window.Zotero_Tooltip.stop()}
|
||||||
style={{ width: "16px", height: "16px" }}
|
style={{ width: "16px", height: "16px" }}
|
||||||
onClick={props.editable ? (() => setSelectedTag(tag.tag)) : undefined}
|
onClick={props.editable ? (() => setSelectedTag(tag.tag)) : undefined}
|
||||||
/>
|
/>
|
||||||
|
@ -385,7 +387,9 @@ const TagsBox = React.forwardRef((props, ref) => {
|
||||||
height="18"
|
height="18"
|
||||||
width="18"
|
width="18"
|
||||||
title={removeStr}
|
title={removeStr}
|
||||||
tooltiptext={removeStr}
|
/* Fix 'title' not working for HTML-in-XUL */
|
||||||
|
onMouseOver={() => window.Zotero_Tooltip.start(removeStr)}
|
||||||
|
onMouseOut={() => window.Zotero_Tooltip.stop()}
|
||||||
src={`chrome://zotero/skin/minus${Zotero.hiDPISuffix}.png`}/>
|
src={`chrome://zotero/skin/minus${Zotero.hiDPISuffix}.png`}/>
|
||||||
</button>)}
|
</button>)}
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in a new issue