diff options
author | David N <dave.noel@gmail.com> | 2012-01-27 03:23:09 +0400 |
---|---|---|
committer | David N <dave.noel@gmail.com> | 2012-01-27 03:23:09 +0400 |
commit | b9589fcb8076aa6b2559553c56d7e65808568a86 (patch) | |
tree | 61aa22f56448bdf7819b8007ab59c13e78a51cdb /js | |
parent | 95356ee0622561b67327b3880bcdc3c5df97cf40 (diff) |
Enable default browser key behaviour when typeahead isn't showing.
Diffstat (limited to 'js')
-rw-r--r-- | js/bootstrap-typeahead.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/bootstrap-typeahead.js b/js/bootstrap-typeahead.js index fad28ea46b..82188f5926 100644 --- a/js/bootstrap-typeahead.js +++ b/js/bootstrap-typeahead.js @@ -157,6 +157,7 @@ case 9: // tab case 13: // enter + if (!this.shown) return this.select() break @@ -172,6 +173,7 @@ , keypress: function (e) { e.stopPropagation() + if (!this.shown) return switch(e.keyCode) { case 9: // tab @@ -181,13 +183,11 @@ break case 38: // up arrow - if (!this.shown) return e.preventDefault() this.prev() break case 40: // down arrow - if (!this.shown) return e.preventDefault() this.next() break |