diff options
author | silverwind <me@silverwind.io> | 2023-05-12 18:58:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 16:58:55 +0000 |
commit | 80bde0141bb4a04b65b399b40ab547bf56c0567e (patch) | |
tree | 85835ef5521dbca049166d1886b49706b5993b84 /web_src/js | |
parent | b20e5f9cd856e71ffc849970faef8e1af04e2569 (diff) | |
download | gitea-80bde0141bb4a04b65b399b40ab547bf56c0567e.tar.gz gitea-80bde0141bb4a04b65b399b40ab547bf56c0567e.zip |
Only hide tooltip tippy instances (#24688)
Fix regression from https://github.com/go-gitea/gitea/pull/24648 where
it was hiding non-tooltip tippy instances, like for example in the
review panel which itself is a tippy instance, but with a different
`role`.
Diffstat (limited to 'web_src/js')
-rw-r--r-- | web_src/js/modules/tippy.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/web_src/js/modules/tippy.js b/web_src/js/modules/tippy.js index 3a8c7e09c2..abae3d33d0 100644 --- a/web_src/js/modules/tippy.js +++ b/web_src/js/modules/tippy.js @@ -18,8 +18,11 @@ export function createTippy(target, opts = {}) { visibleInstances.delete(instance); }, onShow: (instance) => { + // hide other tooltip instances so only one tooltip shows at a time for (const visibleInstance of visibleInstances) { - visibleInstance.hide(); // hide other instances + if (visibleInstance.role === 'tooltip') { + visibleInstance.hide(); + } } visibleInstances.add(instance); }, |