Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Reverted tabulation to common usage:
- first item is not selected anymore (as it would be done in a selectbox)
- tab and shift + tab enables to traverse a form in both directions, without having items selected against our will.
  • Loading branch information
Oncle Tom committed Feb 13, 2012
1 parent b0bd3ef commit 0317219
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/bootstrap-typeahead.js
Expand Up @@ -122,7 +122,6 @@
return i[0]
})

items.first().addClass('active')
this.$menu.html(items)
return this
}
Expand Down Expand Up @@ -174,6 +173,8 @@
break

case 9: // tab
case 16: // shift, used in combination with tab (shift tab for reverse tabbing)
break;
case 13: // enter
if (!this.shown) return
this.select()
Expand All @@ -194,7 +195,7 @@
if (!this.shown) return

switch(e.keyCode) {
case 9: // tab
//case 9: // tab
case 13: // enter
case 27: // escape
e.preventDefault()
Expand Down

0 comments on commit 0317219

Please sign in to comment.