Skip to content

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

Description

@domenic

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.)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions