diff options
author | silverwind <me@silverwind.io> | 2022-08-10 16:47:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-10 22:47:28 +0800 |
commit | d751e35d81d3e9e953ac35e868b9714ba4502f67 (patch) | |
tree | 5e6a3042319003707420a7a50b62bf9285a868f1 /web_src/js/modules | |
parent | 58de07e5fd14c23dd4c4a315b8c5b3fb3219f66a (diff) | |
download | gitea-d751e35d81d3e9e953ac35e868b9714ba4502f67.tar.gz gitea-d751e35d81d3e9e953ac35e868b9714ba4502f67.zip |
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.
Diffstat (limited to 'web_src/js/modules')
-rw-r--r-- | web_src/js/modules/tippy.js | 7 |
1 files changed, 4 insertions, 3 deletions
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; |