From 5f0724f8adca9b545b89e71287f8276e86881868 Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Fri, 25 Jul 2008 14:42:56 -0400 Subject: [PATCH] #1485143: fixed empty body validation errors on IE --- program/js/app.js | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index 657a45d..20c561a 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -1889,13 +1889,20 @@ } // check for empty body - if ((input_message.value == '' && - (!window.tinyMCE || tinyMCE.get('compose-body').getContent() == '')) && - !confirm(this.get_label('nobodywarning'))) + if ((!window.tinyMCE || !tinyMCE.get('compose-body')) + && input_message.value == '' + && !confirm(this.get_label('nobodywarning'))) { input_message.focus(); return false; } + else if (window.tinyMCE && tinyMCE.get('compose-body') + && !tinyMCE.get('compose-body').getContent() + && !confirm(this.get_label('nobodywarning'))) + { + tinyMCE.get('compose-body').focus(); + return false; + } return true; }; -- Gitblit v1.9.1