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 ...@@ -35,8 +35,6 @@ class GitLabDropdownFilter
$inputContainer.removeClass HAS_VALUE_CLASS $inputContainer.removeClass HAS_VALUE_CLASS
if keyCode is 13 if keyCode is 13
if @input.val() isnt "" and @options.enterCallback
@options.enterCallback(e)
return false return false
# Only filter asynchronously only if option remote is set # Only filter asynchronously only if option remote is set
...@@ -212,7 +210,6 @@ class GitLabDropdown ...@@ -212,7 +210,6 @@ class GitLabDropdown
data: => data: =>
return @fullData return @fullData
callback: (data) => callback: (data) =>
currentIndex = -1
@parseData data @parseData data
unless @filterInput.val() is '' unless @filterInput.val() is ''
...@@ -225,8 +222,8 @@ class GitLabDropdown ...@@ -225,8 +222,8 @@ class GitLabDropdown
.first() .first()
.find('a') .find('a')
.addClass('is-focused') .addClass('is-focused')
enterCallback: (e) =>
@selectRowAtIndex(e, 0) currentIndex = 0
# Event listeners # 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