summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-10-19 17:32:19 +0000
committeralecpl <alec@alec.pl>2008-10-19 17:32:19 +0000
commit59ed6f16459318e3bf3babc3282402265cc84b92 (patch)
tree46b468736f4b2f55888695c6ea111129bbbc4a8b
parent44d1f1cf7397e665d36d9c801f5024326120d115 (diff)
#1484684: prevent from data loss when pressing ESC key in IE while message compose
-rw-r--r--skins/default/functions.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/skins/default/functions.js b/skins/default/functions.js
index 1d8ac0290..e232ac771 100644
--- a/skins/default/functions.js
+++ b/skins/default/functions.js
@@ -86,6 +86,12 @@ function rcmail_init_compose_form()
var bcc_field = document.getElementById('rcmcomposebcc');
if (bcc_field && bcc_field.value!='')
rcmail_show_header_form('compose-bcc', document.getElementById('addbcclink'));
+
+ // prevent from form data loss when pressing ESC key in IE
+ if (bw.ie) {
+ var form = rcube_find_object('form');
+ form.onkeydown = function (e) { if (rcube_event.get_keycode(e) == 27) rcube_event.cancel(e); };
+ }
}
/**
@@ -125,7 +131,7 @@ body_keypress: function(evt, p)
};
-var rcmail_ui;// = new rcube_mail_ui();
+var rcmail_ui;
function rcube_init_mail_ui()
{