diff --git a/misc/autocomplete.js b/misc/autocomplete.js index 8f7ac60..8952da2 100755 --- a/misc/autocomplete.js +++ b/misc/autocomplete.js @@ -291,7 +291,7 @@ Drupal.ACDB.prototype.search = function (searchString) { // Ajax GET request for autocompletion. We use Drupal.encodePath instead of // encodeURIComponent to allow autocomplete search terms to contain slashes. - $.ajax({ + db.xhr = $.ajax({ type: 'GET', url: db.uri + '/' + Drupal.encodePath(searchString), dataType: 'json', @@ -306,7 +306,11 @@ Drupal.ACDB.prototype.search = function (searchString) { } }, error: function (xmlhttp) { - alert(Drupal.ajaxError(xmlhttp, db.uri)); + if (xmlhttp.statusText == 'abort') { + // no need to log any error since abort set explicitly + } else { + alert(Drupal.ajaxError(xmlhttp, db.uri)); + } } }); }, this.delay);