-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add element.popoverOpen #9054
Comments
partial interface HTMLDialogElement {
[CEReactions] attribute boolean open;
} https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element Or you mean it should have one for |
I think it depends on how serious the effort to deprecate non-modal dialogs is, and how incompatible the two types of 'open' are after #9045. |
deprecating non-modal dialogs wouldn't be a good idea, imo. popover isn't a replacement for them after all. rather, if one wants a dialog with popover behaviors, they should be using |
Let's keep this thread about |
Turns out that the intent of There are even cases where a single element, such as |
This is a good point, and a good case for adding I'm supportive of adding
In other words, this isn't sugar for |
And not future-proof, since new kinds of 'open' may be introduced. |
Is the use cases here to avoid throwing? What about going in the opposite direction, wouldn't that require this to be a ti-state? |
I'd like to avoid throwing, but that's being discussed in #9045. The use-case is just knowing whether the popover is open or not. What's the third state? "Not a popover"? |
I guess you can check |
It isn't too late to change stuff like that, but |
We are inconsistent on this, e.g., |
I like the nullable version. Empty strings being a third way for the platform to represent "not present" (after undefined and null) is confusing, and especially confusing given that |
Yeah sorry, I didn't mean to suggest using the empty string. " |
I still think that's weird unless we make |
+1 at least personally that Back to the OP for this issue, given recent changes, the definition of |
I think this can be closed given |
Previous discussion: #9045 (comment)
Right now, the way to detect if a popover is open is:
This isn't too hard, although it will throw in browsers that don't support
:open
. A bigger issue is that it isn't very discoverable.Instead:
…would also be falsy in browsers that don't support the feature, and would be discoverable via DX features like autocomplete.
We may want an equivalent for
<dialog>
, but that depends on the outcome of #9045.The text was updated successfully, but these errors were encountered: