Mercurial > bugzilla-dashboard
diff js/modules/app.js @ 64:a196cc29fffb
ESC in dialog now makes it go away
author | Atul Varma <avarma@mozilla.com> |
---|---|
date | Sun, 25 Apr 2010 08:45:26 -0700 |
parents | 88b856b1353b |
children | 8294f3d1efee |
line wrap: on
line diff
--- a/js/modules/app.js Sun Apr 25 08:30:50 2010 -0700 +++ b/js/modules/app.js Sun Apr 25 08:45:26 2010 -0700 @@ -270,6 +270,16 @@ $(this).fadeOut(); }); + function dismissDialogOnEscape(event) { + if (event.keyCode == 27) + $(this).fadeOut(); + } + + // For Safari. + $(".dialog").keyup(dismissDialogOnEscape); + // For Firefox. + $(".dialog").keypress(dismissDialogOnEscape); + function setupDocumentTitleChanger(document) { const BASE_TITLE = document.title;