[third] Create a Typeahead option tabSelects for whether tab autocompletes

(imported from commit d1602e998b54d39eb515d0866e7ed2d158fe97d8)
This commit is contained in:
Jeff Arnold
2012-11-09 17:05:34 -05:00
parent 7cafd7c6d0
commit ef585cf1f6
2 changed files with 6 additions and 3 deletions

View File

@@ -1811,7 +1811,8 @@
switch(e.keyCode) {
case 9: // tab
break
if (!this.options.tabSelects)
break
case 13: // enter
case 27: // escape
@@ -1849,7 +1850,8 @@
break
case 9: // tab
break
if (!this.options.tabSelects)
break
case 13: // enter
if (!this.shown) return
@@ -1907,6 +1909,7 @@
, menu: '<ul class="typeahead dropdown-menu"></ul>'
, item: '<li><a href="#"></a></li>'
, minLength: 1
, tabSelects: true
}
$.fn.typeahead.Constructor = Typeahead