Intent to prototype: Dialog closedby attribute

125 views
Skip to first unread message

Keith Cirkel

unread,
Jan 15, 2025, 4:28:11 AMJan 15
to dev-pl...@mozilla.org

Summary:


A closedby attribute that can be used to control the light dismiss behavior of `<dialog>` elements:

    `<dialog closedby=none>` - no user-triggered closing of dialogs at all.
    `<dialog closedby=closerequest>` - user pressing ESC (or other close trigger) closes the dialog
    `<dialog closedby=any>` - user clicking outside the dialog, or pressing ESC, closes the dialog. Akin to popover=auto behavior.
    `<dialog>` - i.e. no closedby attribute - default/old behavior. Behaves like closedby=closerequest for modal dialogs, and closedby=none for modeless dialogs.


Bug:

Specification:

Standards Body:
  WHATWG

Platform coverage:
  all.

Preference:
  dom.dialog.light-dismiss.enabled

DevTools bug:
n/a.

Link to standards-positions discussion:

Other browsers:
  Blink: Prototyping.
  WebKit: No Signals.

web-platform-tests:

Reply all
Reply to author
Forward
0 new messages