summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-11-23 12:49:30 +0000
committerthomascube <thomas@roundcube.net>2008-11-23 12:49:30 +0000
commit69ad1e81240435f79dde895200bc3ddd9aa3aebf (patch)
tree07d33bec61abfb17b3d90266cbabdf055b68cc29
parent2c8e84c1e59e0f45bab6fd7671949642bdb8a31d (diff)
Add onmouseup handler to hide autocompletion box when clicking outside
-rw-r--r--program/js/app.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 82687da3a..5d0129231 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -202,6 +202,8 @@ function rcube_webmail()
}
if (this.env.drafts_mailbox)
this.enable_command('savedraft', true);
+
+ document.onmouseup = function(e){ return p.doc_mouse_up(e); };
}
if (this.env.messagecount)
@@ -2503,7 +2505,7 @@ function rcube_webmail()
li = document.createElement('LI');
li.innerHTML = a_results[i].replace(/</, '&lt;').replace(/>/, '&gt;').replace(new RegExp('('+this.ksearch_value+')', 'ig'), '<b>$1</b>');
li.onmouseover = function(){ ref.ksearch_select(this); };
- li.onclick = function(){ ref.ksearch_click(this) };
+ li.onmouseup = function(){ ref.ksearch_click(this) };
li._rcm_id = a_result_ids[i];
ul.appendChild(li);
}