How to capture the Esc keypress event that closes the dialog.
Community moderators have prevented the ability to post new answers.
Here is piece of JavaScript from my addon that checks for dialogs closing:
/** * Event handler fired whenever then dialog is hidden (either from js, clicking on the blanket, or pressing ESC). * Here we hide blanket and do some cleaning: JIRA 6.4 does not remove aui-blanket div on dialog hide, but adds * 'aria-hidden' attribute to it. Older versions of JIRA just add/remove aui-blanket div. */ AJS.$(document).on("hideLayer hideAllLayers", function(e, type) { if (e.type === "hideLayer" && type === "popup" || e.type === "hideAllLayers") { // do your stuff } });
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.