Autocomplete has a weird behaviour since "jquery update" upgrade.

In profiles (profile module enabled):
. add a single line text field
. type '*' in the Category field
. see the result (screenshot)

see the attached screenshot

CommentFileSizeAuthor
drupal_autocomplete_issue.png14.6 KBmagoo
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sun’s picture

Status: Active » Closed (duplicate)

Marking as duplicate of #156221: Upgrade to JQuery 1.2.6

denis_sle’s picture

Try to fix autocomplete.js in your 'misc' folder with this code:

Drupal.ACDB.prototype.search = function (searchString) {
  var db = this;
  this.searchString = searchString;

  // See if this key has been searched for before
  if (this.cache[searchString]) {
    return this.owner.found(this.cache[searchString]);
  }

  // Initiate delayed search
  if (this.timer) {
    clearTimeout(this.timer);
  }
  this.timer = setTimeout(function() {
    db.owner.setStatus('begin');

    // Ajax GET request for autocompletion
    $.ajax({
      type: "GET",
      url: db.uri +'/'+ Drupal.encodeURIComponent(searchString),
      success: function (data) {
        // Parse back result
       if(data!='[  ]'){
        var matches = Drupal.parseJson(data);

        if (typeof matches['status'] == 'undefined' || matches['status'] != 0) {
          db.cache[searchString] = matches;
          // Verify if these are still the matches the user wants to see
          if (db.searchString == searchString) {
            db.owner.found(matches);
          }
          db.owner.setStatus('found');
        }
	}
	else{
	db.owner.setStatus('cancel');
	}
      },
      error: function (xmlhttp) {
        alert('An HTTP error '+ xmlhttp.status +' occured.\n'+ db.uri);
      }
    });
  }, this.delay);
}

put it insted original 'Drupal.ACDB.prototype.search' function