Commit 9d69315d authored by Fatih Acet's avatar Fatih Acet

Merge branch 'dropdown-enter-fix' into '8-10-stable'

Dropdown enter key fix

## What does this MR do?

Fixes issue with dropdowns enter key not working correctly

See merge request !5544
parents 131ea30b 3d41a44d
...@@ -565,8 +565,13 @@ class GitLabDropdown ...@@ -565,8 +565,13 @@ class GitLabDropdown
if $el.length and currentIndex > -1 if $el.length and currentIndex > -1
e.preventDefault() e.preventDefault()
e.stopImmediatePropagation() e.stopImmediatePropagation()
$el.first().trigger('click') $first = $el.first()
$el.first().get(0).click?() $firstEl = $first.get(0)
if $firstEl.click
$firstEl.click()
else
$first.trigger('click')
addArrowKeyEvent: -> addArrowKeyEvent: ->
ARROW_KEY_CODES = [38, 40] ARROW_KEY_CODES = [38, 40]
......
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