From 0a36c392db0120534ee6d24beed7b2333c9991cb Mon Sep 17 00:00:00 2001 From: alecpl Date: Mon, 6 Sep 2010 17:37:54 +0000 Subject: [PATCH] - Fix closing popups with ESC key on some browsers --- skins/default/functions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skins/default/functions.js b/skins/default/functions.js index 74b2e5f93..58814f2ae 100644 --- a/skins/default/functions.js +++ b/skins/default/functions.js @@ -237,7 +237,7 @@ target_overlaps: function (target, elementid) return false; }, -body_keypress: function(evt, p) +body_keydown: function(evt, p) { if (rcube_event.get_keycode(evt) == 27) { for (var k in this.popups) { @@ -426,7 +426,7 @@ function rcube_init_mail_ui() { rcmail_ui = new rcube_mail_ui(); rcube_event.add_listener({ object:rcmail_ui, method:'body_mousedown', event:'mousedown' }); - rcube_event.add_listener({ object:rcmail_ui, method:'body_keypress', event:'keypress' }); + rcube_event.add_listener({ object:rcmail_ui, method:'body_keydown', event:'keydown' }); $('iframe').load(iframe_events) .contents().mouseup(function(e){rcmail_ui.body_mousedown(e)});