Skip to content
Snippets Groups Projects
Commit 896b9c1d authored by Phil Hughes's avatar Phil Hughes
Browse files

Fixed issue with filtering & pressing enter key

parent 5d7b2bd4
Branches
Tags
1 merge request!5111Fixed enter submitting form in dropdown
Pipeline #
Loading
Loading
@@ -311,6 +311,7 @@ class GitLabDropdown
return true
 
opened: =>
currentIndex = -1
@addArrowKeyEvent()
 
if @options.setIndeterminateIds
Loading
Loading
@@ -568,9 +569,6 @@ class GitLabDropdown
PREV_INDEX = currentIndex
$listItems = $(selector, @dropdown)
 
# if @options.filterable
# $input.blur()
if currentKeyCode is 40
# Move down
currentIndex += 1 if currentIndex < ($listItems.length - 1)
Loading
Loading
@@ -583,7 +581,7 @@ class GitLabDropdown
return false
 
if currentKeyCode is 13 and currentIndex isnt -1
@selectRowAtIndex e, currentIndex
@selectRowAtIndex e, $('.is-focused', @dropdown).closest('li').index() - 1
 
removeArrayKeyEvent: ->
$('body').off 'keydown'
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment