summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-07-20 14:07:12 +0100
committerPhil Hughes <me@iamphill.com>2016-07-20 14:07:12 +0100
commit71bb7bdf612097aa05cbd654f720d25d36598f17 (patch)
treedf322369521f63118e1c9027194c963ab0a65aab
parentdc1c7b7fc1e95bd80274e9bab27e0ba082087770 (diff)
downloadgitlab-ce-71bb7bdf612097aa05cbd654f720d25d36598f17.tar.gz
Fixed issue where using arrow keys would require arrow key to be pressed twicegl-dropdown-enter-key-fix
-rw-r--r--app/assets/javascripts/gl_dropdown.js.coffee7
1 files changed, 2 insertions, 5 deletions
diff --git a/app/assets/javascripts/gl_dropdown.js.coffee b/app/assets/javascripts/gl_dropdown.js.coffee
index d60935cbb52..7086ece29b8 100644
--- a/app/assets/javascripts/gl_dropdown.js.coffee
+++ b/app/assets/javascripts/gl_dropdown.js.coffee
@@ -35,8 +35,6 @@ class GitLabDropdownFilter
$inputContainer.removeClass HAS_VALUE_CLASS
if keyCode is 13
- if @input.val() isnt "" and @options.enterCallback
- @options.enterCallback(e)
return false
# Only filter asynchronously only if option remote is set
@@ -212,7 +210,6 @@ class GitLabDropdown
data: =>
return @fullData
callback: (data) =>
- currentIndex = -1
@parseData data
unless @filterInput.val() is ''
@@ -225,8 +222,8 @@ class GitLabDropdown
.first()
.find('a')
.addClass('is-focused')
- enterCallback: (e) =>
- @selectRowAtIndex(e, 0)
+
+ currentIndex = 0
# Event listeners