summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-09-21 12:22:40 +0000
committeralecpl <alec@alec.pl>2011-09-21 12:22:40 +0000
commit075e9d5ba25ece5b7fed5470efb38272d519fa27 (patch)
tree1800c01a0d5a0f1cd0f8b05e63070981972aeddb /program/js
parentb578abb9f94fa1d7dc8ce2ee94e35fa074d51ce4 (diff)
- Applied fixes from trunk up to r5259
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/program/js/app.js b/program/js/app.js
index bc16b8607..be42cc8b3 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3489,13 +3489,15 @@ function rcube_webmail()
return rcube_event.cancel(e);
- case 9: // tab
- if (mod == SHIFT_KEY)
- break;
+ case 9: // tab
+ if (mod == SHIFT_KEY || !this.ksearch_visible()) {
+ this.ksearch_hide();
+ return;
+ }
case 13: // enter
- if (this.ksearch_selected === null || !this.ksearch_value)
- break;
+ if (!this.ksearch_visible())
+ return false;
// insert selected address and hide ksearch pane
this.insert_recipient(this.ksearch_selected);
@@ -3520,6 +3522,11 @@ function rcube_webmail()
return true;
};
+ this.ksearch_visible = function()
+ {
+ return (this.ksearch_selected !== null && this.ksearch_selected !== undefined && this.ksearch_value);
+ };
+
this.ksearch_select = function(node)
{
var current = $('#rcmksearchSelected');