-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
Labels
command-invokersinterest-invokersneeds editsThis is ready for edits to be madeThis is ready for edits to be made
Description
Here's a basic tooltip example:
<button interesttarget=tooltip>?</button>
<div popover=hint id=tooltip>Tooltip</div>The desired behavior, for a tooltip, is:
- When the
?button is hovered/focused/etc for a short while ("interest"), the popover will be shown. - The popover will stay open as long as either the button or the popover are hovered/focused/etc.
- When neither has been hovered/focused/etc for a short while ("interest has been lost"), the popover will be hidden.
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 need showinterestaction and loseinterestaction so that the above example becomes:
<button interesttarget=tooltip showinterestaction=showpopover loseinterestaction=hidepopover>?</button>
<div popover=hint id=tooltip>Tooltip</div>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.
lukewarlow
Metadata
Metadata
Assignees
Labels
command-invokersinterest-invokersneeds editsThis is ready for edits to be madeThis is ready for edits to be made