Skip to content

Commit

Permalink
Add dialog closedby="" and requestClose()
Browse files Browse the repository at this point in the history
The new closedby="" attribute for <dialog> can control what closes the dialog, including allowing new light dismiss behavior, or disabling close requests for modal dialogs.

The new dialogEl.requestClose() method acts as if a close request was issued by the user, firing the cancel event, and then (if the event isn't canceled) firing the close event and closing the dialog. This method does not require user activation. The existing closeWatcher.requestClose() method was updated to not require user activation either, to match this.

Closes #9373. Closes #10164. Closes #10592.

See also: openui/open-ui#834, openui/open-ui#950 (especially openui/open-ui#950 (reply in thread)), openui/open-ui#960, openui/open-ui#961.
  • Loading branch information
mfreed7 authored Jan 15, 2025
1 parent ad1450d commit 8029d4f
Showing 1 changed file with 337 additions and 52 deletions.
Loading

0 comments on commit 8029d4f

Please sign in to comment.