Skip to content
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

popover invoker should be boolean #9168

Closed
asurkov opened this issue Apr 14, 2023 · 2 comments · Fixed by #9171
Closed

popover invoker should be boolean #9168

asurkov opened this issue Apr 14, 2023 · 2 comments · Fixed by #9171
Labels
topic: popover The popover attribute and friends

Comments

@asurkov
Copy link

asurkov commented Apr 14, 2023

Popover invoker [1] is defined as

Every [HTML element](https://html.spec.whatwg.org/multipage/infrastructure.html#html-elements) has a popover invoker, which is an [HTML element](https://html.spec.whatwg.org/multipage/infrastructure.html#html-elements) or null, initially set to null.

and is used to define focus navigation scope owner [2] as

If element is in the [popover showing state](https://html.spec.whatwg.org/multipage/popover.html#popover-showing-state) and has a [popover invoker](https://html.spec.whatwg.org/multipage/popover.html#popover-invoker) set, then return element.

Apparently, it doesn't make sense to keep Element, and it can be converted to a boolean. Are there perhaps other future usecases that will need Element?

spin off bug Mozilla bug (https://phabricator.services.mozilla.com/D175265#inline-969858) raised by @emilio

[1] https://html.spec.whatwg.org/multipage/popover.html#popover-invoker
[2] https://html.spec.whatwg.org/multipage/interaction.html#data-model:popover-invoker

@nt1m
Copy link
Member

nt1m commented Apr 14, 2023

At first I thought it was used to create the parent/child relationships but I realized those bits actually query the popover target element instead.

@nt1m nt1m added the topic: popover The popover attribute and friends label Apr 14, 2023
@nt1m
Copy link
Member

nt1m commented Apr 17, 2023

#9171 will resolve this issue by using the invoker to establish parent/child relationships.

annevk pushed a commit that referenced this issue May 8, 2023
Rationale from Mason Freed as per https://chromium-review.googlesource.com/c/chromium/src/+/4429412:

Instead of using the node tree to establish the popover hierarchy, the user's behavior should matter. For example, if one popover contains a popover invoker pointing to another popover, it should matter whether that invoker is *actually used* to open the second popover.

An example:
- Component 1 is a third party widget, which uses popover
- Component 2 is another third party widget, also using popover
- A page wants to use both components separately, from separate invoking buttons.
- Component 1 also wants to be able to use Component 2, via a button within Component 1.

In this example, the page should be able to still independently use these components. So a user clicking the page's button for Component 2 is expected to close Component 1 if it's open, because that's a direct invocation of Component 2. However, if the user clicks the button within Component 1 to get Component 2, it is natural to leave Component 1 open because this is a nested call.

Important note: this often happens to be the behavior even before this change, since the user clicking on the page-level Component 2 invoking button represents a light dismiss signal for Component 1, so it closes either way. But this simplifies the logic, removing the need to track all invokers on the page, and also removing the need to continuously check whether invoker relationships have changed.

Fixes #9160, fixes #9168, and closes #9048 (as per discussion in the PR).
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue May 29, 2023
…emilio

The invoker type is currently implemented as boolean as suggested at
whatwg/html#9168. This issue is now closed and
has been fixed at whatwg/html#9171.

This patch is to be follow above discussions and implement popover invoker
type as element.

Differential Revision: https://phabricator.services.mozilla.com/D178287
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue May 30, 2023
…emilio

The invoker type is currently implemented as boolean as suggested at
whatwg/html#9168. This issue is now closed and
has been fixed at whatwg/html#9171.

This patch is to be follow above discussions and implement popover invoker
type as element.

Differential Revision: https://phabricator.services.mozilla.com/D178287
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this issue May 31, 2023
…emilio

The invoker type is currently implemented as boolean as suggested at
whatwg/html#9168. This issue is now closed and
has been fixed at whatwg/html#9171.

This patch is to be follow above discussions and implement popover invoker
type as element.

Differential Revision: https://phabricator.services.mozilla.com/D178287
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this issue May 31, 2023
…emilio

The invoker type is currently implemented as boolean as suggested at
whatwg/html#9168. This issue is now closed and
has been fixed at whatwg/html#9171.

This patch is to be follow above discussions and implement popover invoker
type as element.

Differential Revision: https://phabricator.services.mozilla.com/D178287
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue May 31, 2023
…emilio

The invoker type is currently implemented as boolean as suggested at
whatwg/html#9168. This issue is now closed and
has been fixed at whatwg/html#9171.

This patch is to be follow above discussions and implement popover invoker
type as element.

Differential Revision: https://phabricator.services.mozilla.com/D178287

UltraBlame original commit: 31915ad324761c4fe80dac65ca36f070ab2102a2
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue May 31, 2023
…emilio

The invoker type is currently implemented as boolean as suggested at
whatwg/html#9168. This issue is now closed and
has been fixed at whatwg/html#9171.

This patch is to be follow above discussions and implement popover invoker
type as element.

Differential Revision: https://phabricator.services.mozilla.com/D178287

UltraBlame original commit: 934b572f87f75a1aa549ef81f2a8068b67d9db9a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue May 31, 2023
…emilio

The invoker type is currently implemented as boolean as suggested at
whatwg/html#9168. This issue is now closed and
has been fixed at whatwg/html#9171.

This patch is to be follow above discussions and implement popover invoker
type as element.

Differential Revision: https://phabricator.services.mozilla.com/D178287

UltraBlame original commit: 31915ad324761c4fe80dac65ca36f070ab2102a2
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue May 31, 2023
…emilio

The invoker type is currently implemented as boolean as suggested at
whatwg/html#9168. This issue is now closed and
has been fixed at whatwg/html#9171.

This patch is to be follow above discussions and implement popover invoker
type as element.

Differential Revision: https://phabricator.services.mozilla.com/D178287

UltraBlame original commit: 934b572f87f75a1aa549ef81f2a8068b67d9db9a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue May 31, 2023
…emilio

The invoker type is currently implemented as boolean as suggested at
whatwg/html#9168. This issue is now closed and
has been fixed at whatwg/html#9171.

This patch is to be follow above discussions and implement popover invoker
type as element.

Differential Revision: https://phabricator.services.mozilla.com/D178287

UltraBlame original commit: 31915ad324761c4fe80dac65ca36f070ab2102a2
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue May 31, 2023
…emilio

The invoker type is currently implemented as boolean as suggested at
whatwg/html#9168. This issue is now closed and
has been fixed at whatwg/html#9171.

This patch is to be follow above discussions and implement popover invoker
type as element.

Differential Revision: https://phabricator.services.mozilla.com/D178287

UltraBlame original commit: 934b572f87f75a1aa549ef81f2a8068b67d9db9a
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue May 31, 2023
…emilio

The invoker type is currently implemented as boolean as suggested at
whatwg/html#9168. This issue is now closed and
has been fixed at whatwg/html#9171.

This patch is to be follow above discussions and implement popover invoker
type as element.

Differential Revision: https://phabricator.services.mozilla.com/D178287
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Jun 1, 2023
…emilio

The invoker type is currently implemented as boolean as suggested at
whatwg/html#9168. This issue is now closed and
has been fixed at whatwg/html#9171.

This patch is to be follow above discussions and implement popover invoker
type as element.

Differential Revision: https://phabricator.services.mozilla.com/D178287

UltraBlame original commit: 1e825b150a60ac26b0f652679eca1b223354fb64
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Jun 1, 2023
…emilio

The invoker type is currently implemented as boolean as suggested at
whatwg/html#9168. This issue is now closed and
has been fixed at whatwg/html#9171.

This patch is to be follow above discussions and implement popover invoker
type as element.

Differential Revision: https://phabricator.services.mozilla.com/D178287

UltraBlame original commit: 1e825b150a60ac26b0f652679eca1b223354fb64
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Jun 1, 2023
…emilio

The invoker type is currently implemented as boolean as suggested at
whatwg/html#9168. This issue is now closed and
has been fixed at whatwg/html#9171.

This patch is to be follow above discussions and implement popover invoker
type as element.

Differential Revision: https://phabricator.services.mozilla.com/D178287

UltraBlame original commit: 1e825b150a60ac26b0f652679eca1b223354fb64
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this issue Jun 2, 2023
…emilio

The invoker type is currently implemented as boolean as suggested at
whatwg/html#9168. This issue is now closed and
has been fixed at whatwg/html#9171.

This patch is to be follow above discussions and implement popover invoker
type as element.

Differential Revision: https://phabricator.services.mozilla.com/D178287
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: popover The popover attribute and friends
Development

Successfully merging a pull request may close this issue.

2 participants