summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorNeil Drumm <drumm@3064.no-reply.drupal.org>2007-01-09 07:31:04 +0000
committerNeil Drumm <drumm@3064.no-reply.drupal.org>2007-01-09 07:31:04 +0000
commitd5e9aad52bd44f8265c22b9e261faa7ae52f9064 (patch)
treec89424bf28bcaeedc09b622cfecdcd20679f68c0 /misc
parent6653e4996e904ae03324ee0149c60b79bcf3ca1f (diff)
downloadbrdo-d5e9aad52bd44f8265c22b9e261faa7ae52f9064.tar.gz
brdo-d5e9aad52bd44f8265c22b9e261faa7ae52f9064.tar.bz2
#107611 by Steven. Fix bug triggered by pressing enter while results are being fetched.
Diffstat (limited to 'misc')
-rw-r--r--misc/autocomplete.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/misc/autocomplete.js b/misc/autocomplete.js
index b0c454c77..166192891 100644
--- a/misc/autocomplete.js
+++ b/misc/autocomplete.js
@@ -213,12 +213,14 @@ Drupal.jsAC.prototype.found = function (matches) {
}
// Show popup with matches, if any
- if (ul.childNodes.length > 0) {
- $(this.popup).empty().append(ul).show();
- }
- else {
- $(this.popup).css({visibility: 'hidden'});
- this.hidePopup();
+ if (this.popup) {
+ if (ul.childNodes.length > 0) {
+ $(this.popup).empty().append(ul).show();
+ }
+ else {
+ $(this.popup).css({visibility: 'hidden'});
+ this.hidePopup();
+ }
}
}