From d751e35d81d3e9e953ac35e868b9714ba4502f67 Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 10 Aug 2022 16:47:28 +0200 Subject: Use separate class for tippy targets (#20742) Previous solution that re-purposed the 'hide' class by making it `!important` had various unintended side-effects where jQuery .show() was not able to outweight it. Use a separate class to prevent these interactions. --- web_src/js/modules/tippy.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'web_src/js/modules') diff --git a/web_src/js/modules/tippy.js b/web_src/js/modules/tippy.js index 87f9e8a4b0..6f3adadddc 100644 --- a/web_src/js/modules/tippy.js +++ b/web_src/js/modules/tippy.js @@ -12,10 +12,11 @@ export function createTippy(target, opts = {}) { ...opts, }); - // for popups where content refers to a DOM element, we use the 'hide' class to initially hide - // the content, now we can remove it as the content has been removed from the DOM by tippy + // for popups where content refers to a DOM element, we use the 'tippy-target' class + // to initially hide the content, now we can remove it as the content has been removed + // from the DOM by tippy if (opts.content instanceof Element) { - opts.content.classList.remove('hide'); + opts.content.classList.remove('tippy-target'); } return instance; -- cgit v1.2.3