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
e5fc22cc
Commit
e5fc22cc
authored
Oct 02, 2014
by
fat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Escape key should only close Dropdown
parent
64a74e93
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
js/dropdown.js
js/dropdown.js
+4
-4
No files found.
js/dropdown.js
View file @
e5fc22cc
...
...
@@ -55,7 +55,7 @@
}
Dropdown
.
prototype
.
keydown
=
function
(
e
)
{
if
(
!
/
(
38|40|27
)
/
.
test
(
e
.
keyCode
))
return
if
(
!
/
(
38|40|27
|32
)
/
.
test
(
e
.
which
))
return
var
$this
=
$
(
this
)
...
...
@@ -67,7 +67,7 @@
var
$parent
=
getParent
(
$this
)
var
isActive
=
$parent
.
hasClass
(
'
open
'
)
if
(
!
isActive
||
(
isActive
&&
e
.
keyCode
==
27
))
{
if
(
(
!
isActive
&&
e
.
which
!=
27
)
||
(
isActive
&&
e
.
which
==
27
))
{
if
(
e
.
which
==
27
)
$parent
.
find
(
toggle
).
trigger
(
'
focus
'
)
return
$this
.
trigger
(
'
click
'
)
}
...
...
@@ -79,8 +79,8 @@
var
index
=
$items
.
index
(
$items
.
filter
(
'
:focus
'
))
if
(
e
.
keyCode
==
38
&&
index
>
0
)
index
--
// up
if
(
e
.
keyCode
==
40
&&
index
<
$items
.
length
-
1
)
index
++
// down
if
(
e
.
which
==
38
&&
index
>
0
)
index
--
// up
if
(
e
.
which
==
40
&&
index
<
$items
.
length
-
1
)
index
++
// down
if
(
!~
index
)
index
=
0
$items
.
eq
(
index
).
trigger
(
'
focus
'
)
...
...
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