Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Capture Esc keypress event confluence plugin development

Akanksha Sharma October 6, 2015

How to capture the Esc keypress event that closes the dialog.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 6, 2015

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
        }
      });
TAGS
AUG Leaders

Atlassian Community Events