]> source.dussan.org Git - gitea.git/commit
Only show one tippy at a time (#24648)
authorsilverwind <me@silverwind.io>
Thu, 11 May 2023 05:40:54 +0000 (07:40 +0200)
committerGitHub <noreply@github.com>
Thu, 11 May 2023 05:40:54 +0000 (05:40 +0000)
commitbcd0733a64012c50ed3d61305be290d1d523d252
treeb9f94968eeef856befdc8fc4ab6aae1a5b4d955d
parent3d9ed62f4aee91f5281c6ff47053d6ecafe3fd9b
Only show one tippy at a time (#24648)

Because our tippy instances have an `interactiveBorder`, it's possible
to bring up two instances at once, which is undesirable.

<img width="256" alt="Screenshot 2023-05-10 at 23 03 04"
src="https://github.com/go-gitea/gitea/assets/115237/3a9a1775-78c1-46d4-a8a5-503ab7dca0d8">

Prevent this by keeping track of visible tippy instances and hiding
others when one is shown. Tippy also has the [singleton
addon](https://atomiks.github.io/tippyjs/v6/addons/#singleton) for the
same purpose, but it's unsuitable to us because we don't init all
tooltips at once.
web_src/js/modules/tippy.js