From 69ad1e81240435f79dde895200bc3ddd9aa3aebf Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Sun, 23 Nov 2008 07:49:30 -0500 Subject: [PATCH] Add onmouseup handler to hide autocompletion box when clicking outside --- program/js/app.js | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index 82687da..5d01292 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -202,6 +202,8 @@ } 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 @@ li = document.createElement('LI'); li.innerHTML = a_results[i].replace(/</, '<').replace(/>/, '>').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); } -- Gitblit v1.9.1