From 542645ea7b2e5b61962fdb54cbe27dfe93b56b32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20T=C3=B6gl?= <toegl@tugraz.at> Date: Wed, 15 Sep 2021 11:30:03 +0200 Subject: [PATCH] Fix a bug with tooltip --- packages/tooltip/src/info-tooltip.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/tooltip/src/info-tooltip.js b/packages/tooltip/src/info-tooltip.js index 03679c6e..33e328ec 100644 --- a/packages/tooltip/src/info-tooltip.js +++ b/packages/tooltip/src/info-tooltip.js @@ -68,7 +68,13 @@ export class InfoTooltip extends ScopedElementsMixin(DBPLitElement) { const tippy2CSS = commonUtils.getAssetURL(tippy2CSSPath); if (this._('#info-tooltip-icon')) { - this.tippy = tippy(this._('#info-tooltip-icon'), { content: this.textContent }); + this.tippy = tippy(this._('#info-tooltip-icon'), { + content: this.textContent, + appendTo: this.shadowRoot, + interactive: this.interactive, + allowHTML: this.interactive ? true : false, + hideOnClick: this.interactive ? false : true, + }); } return html` -- GitLab