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 API conflates Esc dismiss with light dismiss #30309

Closed
lukewarlow opened this issue Nov 16, 2023 · 4 comments · Fixed by #30890
Closed

Popover API conflates Esc dismiss with light dismiss #30309

lukewarlow opened this issue Nov 16, 2023 · 4 comments · Fixed by #30890
Labels
Content:WebAPI Web API docs effort: small This task is a small effort. help wanted If you know something about this topic, we would love your help!

Comments

@lukewarlow
Copy link
Contributor

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/Popover_API/Using#auto_state_and_light_dismiss

What specific section or headline is this issue about?

auto state, and "light dismiss"

What information was incorrect, unhelpful, or incomplete?

The popover can be "light dismissed" — this means that you can hide the popover by clicking outside it or pressing the Esc key.

What did you expect to see?

This text conflates two separate concepts, light dismiss is the clicking outside to close behaviour, the escape key (and android back gesture) isn't part of this.

Do you have any supporting links, references, or citations?

whatwg/html#9373 (comment)

Do you have anything more you want to share?

The HTML spec itself might be ambiguous here and if so needs improvements too, but it feels right to correct it in MDN.

MDN metadata

Page report details
@lukewarlow lukewarlow added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Nov 16, 2023
@github-actions github-actions bot added the Content:WebAPI Web API docs label Nov 16, 2023
@pepelsbey pepelsbey added help wanted If you know something about this topic, we would love your help! effort: small This task is a small effort. and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Nov 20, 2023
@pepelsbey
Copy link
Contributor

Hey! Good catch :) Is it safe to say that this event categorization is certain enough in the spec to be documented the same way on MDN?

@lukewarlow
Copy link
Contributor Author

https://html.spec.whatwg.org/multipage/interaction.html#close-requests-and-close-watchers

Should be the bit of the html spec that the escape key is handled by. I think the spec is probably correct enough to document. Idk if closewatcher itself is documented in MDN yet. But even if it's just separated from click outside for now I think that's enough.

@pepelsbey
Copy link
Contributor

The CloseWatcher is not currently documented on MDN, but I think it doesn’t stop us from fixing this.

Feel free to suggest a PR!

@hamishwillee
Copy link
Collaborator

Fixed by #30890 - thanks @BartoszKlonowski !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs effort: small This task is a small effort. help wanted If you know something about this topic, we would love your help!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants