Index: /trunk/roundcubemail/CHANGELOG
===================================================================
--- /trunk/roundcubemail/CHANGELOG	(revision 2308)
+++ /trunk/roundcubemail/CHANGELOG	(revision 2309)
@@ -1,4 +1,8 @@
 CHANGELOG RoundCube Webmail
 ---------------------------
+
+2009/02/24 (alec)
+----------
+- Fix IE problem with mouse click autocomplete (#1485739)
 
 2009/02/18 (alec)
Index: /trunk/roundcubemail/program/js/app.js
===================================================================
--- /trunk/roundcubemail/program/js/app.js	(revision 2308)
+++ /trunk/roundcubemail/program/js/app.js	(revision 2309)
@@ -2476,5 +2476,5 @@
     var cpos = this.get_caret_pos(this.ksearch_input);
     var p = inp_value.lastIndexOf(this.ksearch_value, cpos);
-    
+
     // replace search string with full address
     var pre = this.ksearch_input.value.substring(0, p);
@@ -2482,5 +2482,5 @@
     var insert  = this.env.contacts[id]+', ';
     this.ksearch_input.value = pre + insert + end;
-    
+
     // set caret to insert pos
     cpos = p+insert.length;
@@ -2592,9 +2592,9 @@
   this.ksearch_click = function(node)
   {
+    if (this.ksearch_input)
+      this.ksearch_input.focus();
+
     this.insert_recipient(node._rcm_id);
     this.ksearch_hide();
-    
-    if (ref.ksearch_input)
-      this.ksearch_input.focus();
   };
 
@@ -4007,5 +4007,4 @@
     if (typeof(obj.selectionEnd)!='undefined')
       return obj.selectionEnd;
-
     else if (document.selection && document.selection.createRange)
       {
@@ -4025,5 +4024,4 @@
       return p<=obj.value.length ? p : -1;
       }
-
     else
       return obj.value.length;
