Commit 9f60a2ed authored by Phil Hughes's avatar Phil Hughes

Fixed issue with enter key selecting wrong option in dropdown

If you search for a label and press enter the dropdown will select the last element rather than the first. This is because the currentIndex is -1 rather than 0

Closes #17630
parent f26389a0
......@@ -460,7 +460,7 @@ class GitLabDropdown
return false
if currentKeyCode is 13
@selectRowAtIndex currentIndex
@selectRowAtIndex if currentIndex < 0 then 0 else currentIndex
removeArrayKeyEvent: ->
$('body').off 'keydown'
......
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