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

[Popup] [Light Dismiss] Light dismiss "escape key" should probably include all close signals #320

Closed
melanierichards opened this issue Apr 9, 2021 · 2 comments
Labels
popover The Popover API stale

Comments

@melanierichards
Copy link
Collaborator

On MS Edge Explainers #457, @domenic said:

The popup explainer says

An opened popup will have “light dismiss” behavior, meaning that it will be automatically hidden when:

  • The user hits the escape key,

@dvoytenko and I have been working on https://github.com/slightlyoff/history_api/blob/master/history_and_modals.md, which is quite related. We believe that this escape key mention should probably be expanded to cover all "close signals", including:

  • Esc on desktop
  • Android back button
  • Accessibility technology gestures (e.g. iOS two-finger scrub)
  • Maybe even game console buttons

@natechapin is working on a Chromium implementation of this concept, that so far intercepts both the desktop Esc key and the Android back button.

Our plan is to have all parts of the platform which use these close signals, e.g. the fullscreen API or the <dialog> element, use a core unified definition. Hopefully <popup> will too.

(Separately, some of the explainer linked above also talks about a ModalCloseWatcher class to allow direct developer handling of close signals. But, that would just be another consumer of this core "close signal" concept. The overlap with <popup> is about the hopefully-shared concept.)

This should probably go into our shared definition of "light dismiss", which can then be referenced by <popup>.

@github-actions
Copy link

There hasn't been any discussion on this issue for a while, so we're marking it as stale. If you choose to kick off the discussion again, we'll remove the 'stale' label.

@github-actions github-actions bot added the stale label Mar 19, 2022
@mfreed7
Copy link
Collaborator

mfreed7 commented Mar 24, 2022

There already was a reference to close signals, but I just put up a PR to replace most "Esc" references with "close signal". I'll get that landed.

@mfreed7 mfreed7 closed this as completed Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
popover The Popover API stale
Projects
None yet
Development

No branches or pull requests

2 participants