Commit 71bb7bdf authored by Phil Hughes's avatar Phil Hughes

Fixed issue where using arrow keys would require arrow key to be pressed twice

parent dc1c7b7f
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment