From 1a4e42f28d8e83185c60317cd163cb7da0a18073 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 20 Jun 2019 11:50:14 +0200 Subject: [PATCH 1/2] 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); } From 457a04e39a590ee3d22e43e51eef8a8a1f64df82 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 20 Jun 2019 11:51:47 +0200 Subject: [PATCH 2/2] lint --- www/common/common-interface.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/common-interface.js b/www/common/common-interface.js index 2c161d784..e44a4ecff 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -799,7 +799,7 @@ 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) { + if (el._tippy && el._tippy.reference && document.body.contains(el._tippy.reference)) { el._tippy.destroy(); el.remove(); return;