Closed chucker closed 9 months ago
Can we make "hides the popover if you click outside" work somehow?
Can we make "hides the popover if you click outside" work somehow?
I gave it a few attempts, and couldn't find anything nice.
onfocusout
, but I'm not sure you can make a <span>
take focus in the first place.You can make any HTML element focusable via tabindex=0
. When opening the popover that element could be focussed and when focus on that element is lost, the popover can close.
Mostly fixes #31.
Also waiting on #40. See TODO inExplanationPopover.razor
.What it does do:
✅ hides the popover if you click another popover ✅ hides the popover if you click the same popover (toggles it)
What it doesn't do:
❌ hides the popover if you click outside