Open mfreed7 opened 5 months ago
This came up from my limited prototyping in chromium. I don't think toggle is actually correct you want it to behave how you've described above. Now it's possible we can do a special "do the thing" for popover but more likely we should build it into the API.
Now it's possible we can do a special "do the thing" for popover but more likely we should build it into the API.
My thought was that the "auto" behavior could magically do the right thing for popovers. But if we want to have an explicit way to do the same magic (or if we're going to always require the action attribute(s)), it seems like you'd need to have two attributes, or a special value of a single attribute that implies this magic.
The Open UI Community Group just discussed [interest invokers] How to define/control the action on "losing interest"
, and agreed to the following:
RESOLVED: there should be a value of the interestaction attribute that means the correct behavior for popovers. They show when interest is shown, and hide when interest is lost.
Here's a basic tooltip example:
The desired behavior, for a tooltip, is:
?
button is hovered/focused/etc for a short while ("interest"), the popover will be shown.It has been proposed, for the "invokers" proposal, to require the action (
command
) attribute. If that sticks, and is also required here, does that mean there will need to be two more action attributes? For example, we might needshowinterestaction
andloseinterestaction
so that the above example becomes:I don't think a single value (e.g.
interestaction=togglepopover
) works. Because you could hover the button to show the popover, and then click outside, which will light-dismiss the popover, and then after a short while the "lose interest" event will happen, which will toggle the popover back open. Suppressing the "lose interest" event in this case seems a bit too magic.