From 1a4e42f28d8e83185c60317cd163cb7da0a18073 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 20 Jun 2019 11:50:14 +0200 Subject: [PATCH] Tippy fix --- www/common/common-interface.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/www/common/common-interface.js b/www/common/common-interface.js index 5391636ab..2c161d784 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -799,6 +799,11 @@ define([ // forever, this is a solution which just searches for tooltips which have no corrisponding element and removes // them. $('.tippy-popper').each(function (i, el) { + if (el._tippy && el._tippy.reference && document.body.contains(el._tippy.reference) { + el._tippy.destroy(); + el.remove(); + return; + } if ($('[aria-describedby=' + el.getAttribute('id') + ']').length === 0) { el.remove(); } @@ -849,6 +854,9 @@ define([ mutations.forEach(function(mutation) { if (mutation.type === "childList") { for (var i = 0; i < mutation.addedNodes.length; i++) { + if ($(mutation.addedNodes[i]).attr('title')) { + addTippy(0, mutation.addedNodes[i]); + } $(mutation.addedNodes[i]).find('[title]').each(addTippy); }