Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
11d7ef15
Commit
11d7ef15
authored
Jan 26, 2012
by
Jacob Thornton
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1272 from napoleond/2.0-wip
Support tab and enter in typeahead
parents
c63175dc
b9589fcb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
js/bootstrap-typeahead.js
js/bootstrap-typeahead.js
+2
-2
No files found.
js/bootstrap-typeahead.js
View file @
11d7ef15
...
@@ -157,6 +157,7 @@
...
@@ -157,6 +157,7 @@
case
9
:
// tab
case
9
:
// tab
case
13
:
// enter
case
13
:
// enter
if
(
!
this
.
shown
)
return
this
.
select
()
this
.
select
()
break
break
...
@@ -172,6 +173,7 @@
...
@@ -172,6 +173,7 @@
,
keypress
:
function
(
e
)
{
,
keypress
:
function
(
e
)
{
e
.
stopPropagation
()
e
.
stopPropagation
()
if
(
!
this
.
shown
)
return
switch
(
e
.
keyCode
)
{
switch
(
e
.
keyCode
)
{
case
9
:
// tab
case
9
:
// tab
...
@@ -181,13 +183,11 @@
...
@@ -181,13 +183,11 @@
break
break
case
38
:
// up arrow
case
38
:
// up arrow
if
(
!
this
.
shown
)
return
e
.
preventDefault
()
e
.
preventDefault
()
this
.
prev
()
this
.
prev
()
break
break
case
40
:
// down arrow
case
40
:
// down arrow
if
(
!
this
.
shown
)
return
e
.
preventDefault
()
e
.
preventDefault
()
this
.
next
()
this
.
next
()
break
break
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment