Skip to content

Instantly share code, notes, and snippets.

Created September 15, 2011 03:00
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do? autocomplete "exact match" bug

Unminified fragment (pin.js, Pin.Tags.prototype.filter, line 884):

if (Pin.Lang.indexOf(words, w) >= 0)  // case-sensitive
    lis[i].className = 'selected';




  1. Extra conditions exist in the minified code
  2. These conditions (specifically, the toLowerCase portion) cause .selected to be applied to the li
  3. .selected causes the li to be hidden
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment