Skip to content

Commit

Permalink
fix: tooltip not closed on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
kodehat committed Sep 29, 2024
1 parent b2a1d48 commit 622a1e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/components/portal.templ
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ templ HomePortalWithToolTip(portal models.Portal) {
if len(portal.Keywords) == 0 {
@HomePortal(portal)
} else {
<div x-data="{ open: false }" @mouseover="open = true" @mouseleave="open = false" class="relative">
<div x-data="{ open: false }" @mouseover="open = true" @mouseleave="open = false" @click.outside="open = false" class="relative">
@HomePortal(portal)
<div x-show="open" class="mt-2.5 w-full absolute flex flex-wrap justify-center z-10 top-full text-center px-2 py-1 gap-x-2 gap-y-2 rounded-md bg-slate-300 dark:bg-slate-800">
for _, keyword := range portal.Keywords {
Expand Down

0 comments on commit 622a1e5

Please sign in to comment.