Add events to $.modalBox to capture "Escape" keypresses everywhere.

Review Request #13126 — Created June 26, 2023 and submitted — Latest diff uploaded

Information

Djblets
release-4.x

Reviewers

We have a handful of dialogs that use $.modalBox to create a modal on
the screen. In most cases, these have a "Close" or "Cancel" button, but
pressing the escape key wouldn't do anything. This change adds some
additional event handling to capture keypresses on the dialog itself as
well as the overlay and the base body element. This is then plumbed into
a "close" event triggered on the element, which the caller can handle to
perform whatever action necessary to close the dialog.

Used in conjuction with a change on the Review Board side.

Commits

Files

    Loading...