mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-18 17:16:08 +10:00
Merge branch 'dropdown-enter-select' into 'master'
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 See merge request !4210
This commit is contained in:
@@ -512,7 +512,7 @@ class GitLabDropdown
|
||||
return false
|
||||
|
||||
if currentKeyCode is 13
|
||||
@selectRowAtIndex currentIndex
|
||||
@selectRowAtIndex if currentIndex < 0 then 0 else currentIndex
|
||||
|
||||
removeArrayKeyEvent: ->
|
||||
$('body').off 'keydown'
|
||||
|
||||
Reference in New Issue
Block a user