diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/content/dependencies/generateTextWithTooltip.js | 8 | ||||
-rw-r--r-- | src/content/dependencies/generateTooltip.js | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/content/dependencies/generateTextWithTooltip.js b/src/content/dependencies/generateTextWithTooltip.js index 87626367..49ce1f61 100644 --- a/src/content/dependencies/generateTextWithTooltip.js +++ b/src/content/dependencies/generateTextWithTooltip.js @@ -46,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 = diff --git a/src/content/dependencies/generateTooltip.js b/src/content/dependencies/generateTooltip.js index 8314d33c..b09ee230 100644 --- a/src/content/dependencies/generateTooltip.js +++ b/src/content/dependencies/generateTooltip.js @@ -22,6 +22,7 @@ export default { html.tag('span', {class: 'tooltip'}, {[html.noEdgeWhitespace]: true}, {[html.onlyIfContent]: true}, + {[html.onlyIfSiblings]: true}, slots.attributes, html.tag('span', {class: 'tooltip-content'}, |