aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2012-01-21 21:46:47 -0800
committerJacob Thornton <[email protected]>2012-01-21 21:46:47 -0800
commit4fe11342d049f708c3416e5b29fa3ed5bfc3b393 (patch)
treed1d0f9ea7503d4753043078c877f8e47f1d4d227
parentd3817cf4662971599bd4baffc6284c7d9b03f0e2 (diff)
downloadbootstrap-4fe11342d049f708c3416e5b29fa3ed5bfc3b393.tar.xz
bootstrap-4fe11342d049f708c3416e5b29fa3ed5bfc3b393.zip
make case lookahead case insensitive
-rw-r--r--js/bootstrap-typeahead.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/bootstrap-typeahead.js b/js/bootstrap-typeahead.js
index b4957c3f6..16539fefb 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 () {