diff options
| author | Jacob Thornton <[email protected]> | 2012-01-26 23:04:42 -0800 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2012-01-26 23:04:42 -0800 |
| commit | 11d7ef1515a09559b287089782abf85827e667c4 (patch) | |
| tree | d9f415cbf68fb720f4f14b7d90a58c38c13de7e0 | |
| parent | c63175dc1d41e2d26e50194a7e24cc0ea618446b (diff) | |
| parent | b9589fcb8076aa6b2559553c56d7e65808568a86 (diff) | |
| download | bootstrap-11d7ef1515a09559b287089782abf85827e667c4.tar.xz bootstrap-11d7ef1515a09559b287089782abf85827e667c4.zip | |
Merge pull request #1272 from napoleond/2.0-wip
Support tab and enter in typeahead
| -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 1205a99ca..6417594fe 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 |
