From 7f03884966c284bfb67b2e85da6408f323200c61 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 21 Sep 2011 08:04:45 -0400
Subject: [PATCH] - Revert possibility to select contact with TAB key in autocompletion list
---
program/js/app.js | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/program/js/app.js b/program/js/app.js
index c149630..f9233eb 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3495,9 +3495,15 @@
return rcube_event.cancel(e);
+ 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);
@@ -3505,7 +3511,6 @@
return rcube_event.cancel(e);
- case 9: // tab
case 27: // escape
this.ksearch_hide();
return;
@@ -3523,6 +3528,11 @@
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');
--
Gitblit v1.9.1