Skip to content

popover=hint has multiple weird and inconsistent behaviours #12304

@jakearchibald

Description

@jakearchibald

What is the issue with the HTML Standard?

https://random-stuff.jakearchibald.com/popover-hint/

Videos below have audio.

Weirdness 1 - does showing a hint popover hide unrelated auto popovers?

nested-hint.mp4

Unnested, opening an auto popover then a hint popover shows both. Nested, opening an auto popover then a hint popover hides the auto popover.

The nested behaviour seems wrong, but here's where it happens in the spec. And here's a test.

Proposal: Opening a hint popover should never directly cause auto popovers to hide.

Weirdness 2 - does showing a hint popover hide unrelated hint popovers?

av1.mp4

Opening a nested hint popover then an unnested hint popover shows both hints. Opening an unnested hint popover then a nested hint popover hides the first.

The nested popover=hint ends up in the "auto" stackToAppendTo, which seems really weird, but may be the source of the weirdness.

Proposal: Opening a hint should close other hints, except those that are 'parent' to it.

Weirdness 3 - does clicking outside an auto popover stack hide it?

av1.mp4

Opening an unnested auto popover and an unnested hint popover, then clicking within the hint popover, leaves both popovers visible, even though the auto popover is unrelated to the hint. Clicking outside an auto or hint popover should close it.

Proposal: Clicking outside of auto and hint popovers should consistently close them, except popovers that are 'parent' to a clicked popover.

Weirdness 4 - does hiding an auto popover hide unrelated hint popovers?

av1.mp4

When an auto popover hides, it also hides all hint popovers.

This seems bad in cases where auto popovers may hide without user interaction, such as a timeout, or as part of DOM element removal (virtual lists).

Proposal: Hiding an auto popover should only hide 'child' auto/hint popovers, and should not impact unrelated popovers.

Weirdness 5 - is showing an auto popover within an hint popover allowed?

This is now being discussed in #12346

auto-inside-hint.mp4

Opening an auto popover within a hint popover leaves things in a broken state.

Apparently you "can't" do this, but the only web-standard source of that rule is the name of this test.

Proposal: If this shouldn't be allowed, we should prevent it happening (throwing/logging an error), or find some non-broken way for it to happen (treat the auto popover as a hint).

cc @mfreed7 @josepharhar @keithamus

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: popoverThe popover attribute and friends

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions