Loading ...
Sorry, an error occurred while loading the content.
 

Autocomplete backspace with typeahead activated (Suggestion / Fix)

Expand Messages
  • liquidblackstar
    My apologies if this has already been discussed, I couldn t find it. Autocomplete works great for me except when the typeahead feature is activated and the
    Message 1 of 1 , Nov 3, 2006
      My apologies if this has already been discussed, I couldn't find it.

      Autocomplete works great for me except when the typeahead feature is
      activated and the user types a backspace. In this case it is very
      difficult to actually hit backspace and delete characters without the
      typeahead immediately filling out the original word.  I realize I
      could turn up the queryDelay however I just don't want to.

      The fix I've come up with is quite simple and I would love to see it
      integrated in some manner.  

      (version 0.11.4)

      Inside of the function: YAHOO.widget.AutoComplete.prototype._populateList, wrapped
      around the line "
      oSelf._typeAhead(oFirstItem,sQuery);
      is the
      conditional:
      if(oSelf._nKeyCode != 8){ ... }

      This forces the typeAhead to cease when the backspace is pressed.  Not
      the most elegant method of fitting it into the codebase, but the
      easiest for now.

      This functionality mimics Google Suggest, and surely others.
    Your message has been successfully submitted and would be delivered to recipients shortly.