summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorNeil Drumm <drumm@3064.no-reply.drupal.org>2006-12-29 07:20:26 +0000
committerNeil Drumm <drumm@3064.no-reply.drupal.org>2006-12-29 07:20:26 +0000
commit3074b97f4343e5489f93a6961ed132f6e7eb3b40 (patch)
tree0102365925aeab9eb57d8e9cb6eb5f78fba6c5e1 /misc
parentbc82525c95b42207160365d6c6743cce79a43c47 (diff)
downloadbrdo-3074b97f4343e5489f93a6961ed132f6e7eb3b40.tar.gz
brdo-3074b97f4343e5489f93a6961ed132f6e7eb3b40.tar.bz2
#86384 by AjK and Steve McKenzie. Catch backspace in autocomplete fields.
Diffstat (limited to 'misc')
-rw-r--r--misc/autocomplete.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/misc/autocomplete.js b/misc/autocomplete.js
index abdf6342e..593fb5e0a 100644
--- a/misc/autocomplete.js
+++ b/misc/autocomplete.js
@@ -195,6 +195,11 @@ Drupal.jsAC.prototype.populatePopup = function () {
* Fills the suggestion popup with any matches received
*/
Drupal.jsAC.prototype.found = function (matches) {
+ // If no value in the textfield, do not show the popup.
+ if (!this.input.value.length) {
+ return false;
+ }
+
// Prepare matches
var ul = document.createElement('ul');
var ac = this;