From b2f3e60d22aa2d33dcfb3deaa5fb9d21c31df86f Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 02 Sep 2010 13:06:37 -0400
Subject: [PATCH] - Fix JS error in IE (can't move focus to the control...) (#1486972)

---
 program/js/editor.js |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/program/js/editor.js b/program/js/editor.js
index 48d8cfa..4555582 100644
--- a/program/js/editor.js
+++ b/program/js/editor.js
@@ -62,13 +62,14 @@
 }
 
 // react to real individual tinyMCE editor init
-function rcmail_editor_callback(editor)
+function rcmail_editor_callback()
 {
-  var editor, elem = rcube_find_object('_from');
+  var elem = rcube_find_object('_from');
   if (elem && elem.type=='select-one') {
     rcmail.change_identity(elem);
     // Focus previously focused element
-    rcmail.env.compose_focus_elem.focus();
+    if (rcmail.env.compose_focus_elem.id != rcmail.env.composebody)
+      rcmail.env.compose_focus_elem.focus();
   }
   // set tabIndex and set focus to element that was focused before
   rcmail_editor_tabindex(rcmail.env.compose_focus_elem && rcmail.env.compose_focus_elem.id == rcmail.env.composebody);

--
Gitblit v1.9.1