You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Option 2: Show it, but immediately hide it without events
This sounds weird, but it's what happens if you show a popover in the beforetoggle-hide of another popover.
However, I'm not sure this is a good idea, as you'd still get the side-effects of showing the auto popover, and it being a no-op feels better. In fact, I kinda wish this is what happened in the beforetoggle case.
Option 3: Downgrade to hint
Allow the popover to be shown, but show it as a hint. This allows the popover to show, but it would interact with other popovers as a hint, which may be confusing.
One use-case worth considering is custom-select, which uses an auto popover for its picker. Do we want a <select> to work in a hint popover?
An example could be a hover menu which contains options like a currency/language picker. Although I think you could argue that this shouldn't be a hint popover, even if it activates on hover.
What is the issue with the HTML Standard?
auto-inside-hint.mp4
The above is the current spec'd behaviour.
In the Open UI explainer, it says that
But that didn't make it into the standard.
Here are the options I see, but feel free to add more:
Option 1: It's an error and should throw if possible
If done via
showPopover, the call should throw. If done a declarative way, an error should be logged to the console.This is consistent with how popovers treat invalid states.
It's also what I spec'd in #12345.
Option 2: Show it, but immediately hide it without events
This sounds weird, but it's what happens if you show a popover in the
beforetoggle-hide of another popover.However, I'm not sure this is a good idea, as you'd still get the side-effects of showing the auto popover, and it being a no-op feels better. In fact, I kinda wish this is what happened in the
beforetogglecase.Option 3: Downgrade to hint
Allow the popover to be shown, but show it as a hint. This allows the popover to show, but it would interact with other popovers as a hint, which may be confusing.
One use-case worth considering is custom-select, which uses an auto popover for its picker. Do we want a
<select>to work in a hint popover?An example could be a hover menu which contains options like a currency/language picker. Although I think you could argue that this shouldn't be a hint popover, even if it activates on hover.