-
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
Why does popover hide when the popover attribute changed #10123
Comments
@josepharhar will be able to answer this succinctly. |
I think it would introduce complexity and unexpected states to allow switching between popover types without closing the popover. For example, we currently only allow multiple popover=auto popovers to be open if they are associated via a relationship, such as if one is a dom ancestor of another. If we allowed an unrelated popover to switch from popover=manual to popover=auto, should we close all other popover=auto popovers? If we don't then other algorithms would encounter an invalid state, and if we do then we have to add a bunch of partially duplicated code from the hide popover algorithm.
Why does your popover need to change states after opening? Why can't it just have popover=manual before it opens? |
@josepharhar Thanks for your reply. So changed it's attribute from auto to manual when tooltip shows, and change back after closed. Maybe the only case is tooltip, a global one without ancestor relationship to other elements. |
What is the issue with the HTML Standard?
In https://html.spec.whatwg.org/multipage/popover.html#the-popover-attribute:concept-element-attributes-change-ext step 3:
Why does popover need to be closed when the attribute changes between state enums?
I have a case: there's a global tooltip (implements with popover also) in popover (call it "X" alias).
When the
X popover
shown, then shows the global tooltip, theX popover
auto closed.So I try to change
X popover
tomanual
, but it closed when attribute changed.The text was updated successfully, but these errors were encountered: