From: Jacob Thornton Date: Sun, 22 Jan 2012 05:46:47 +0000 (-0800) Subject: make case lookahead case insensitive X-Git-Tag: v2.0.0~6^2~255 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4fe11342d049f708c3416e5b29fa3ed5bfc3b393;p=thirdparty%2Fbootstrap.git make case lookahead case insensitive --- diff --git a/js/bootstrap-typeahead.js b/js/bootstrap-typeahead.js index b4957c3f61..16539fefbf 100644 --- a/js/bootstrap-typeahead.js +++ b/js/bootstrap-typeahead.js @@ -35,7 +35,8 @@ constructor: Typeahead , matcher: function (item, query) { - return ~item.indexOf(query) + // ;_; http://jsperf.com/asdfdfasdfa + return ~item.toLowerCase().indexOf(query.toLowerCase()) } , select: function () {