diff options
Diffstat (limited to 'src/content/dependencies/generateTextWithTooltip.js')
-rw-r--r-- | src/content/dependencies/generateTextWithTooltip.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/content/dependencies/generateTextWithTooltip.js b/src/content/dependencies/generateTextWithTooltip.js index 462557d1..49ce1f61 100644 --- a/src/content/dependencies/generateTextWithTooltip.js +++ b/src/content/dependencies/generateTextWithTooltip.js @@ -36,6 +36,7 @@ export default { if (hasTooltip) { attributes = attributes.clone(); attributes.add({ + [html.onlyIfContent]: true, [html.joinChildren]: '', [html.noEdgeWhitespace]: true, class: 'text-with-tooltip', @@ -45,11 +46,19 @@ export default { const textPart = (hasTooltip && slots.customInteractionCue ? html.tag('span', {class: 'hoverable'}, + {[html.onlyIfContent]: true}, + slots.text) + : hasTooltip ? html.tag('span', {class: 'hoverable'}, + {[html.onlyIfContent]: true}, + html.tag('span', {class: 'text-with-tooltip-interaction-cue'}, + {[html.onlyIfContent]: true}, + slots.text)) + : slots.text); const content = |