summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-07-28 10:55:56 +0100
committerPhil Hughes <me@iamphill.com>2016-07-28 10:55:56 +0100
commit5e52e1a2e6271cccc86c1bfcc3f09c1b0eaa1416 (patch)
tree51bb2f953eb76ea46b9f3fff798968e23ce4d411 /app
parent950ac0842c7893548c543d8bd22892601954f6ea (diff)
downloadgitlab-ce-5e52e1a2e6271cccc86c1bfcc3f09c1b0eaa1416.tar.gz
Fixes issue with dropdowns enter key not working correctly
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/gl_dropdown.js.coffee7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/assets/javascripts/gl_dropdown.js.coffee b/app/assets/javascripts/gl_dropdown.js.coffee
index 73164cdce1d..68b0d238669 100644
--- a/app/assets/javascripts/gl_dropdown.js.coffee
+++ b/app/assets/javascripts/gl_dropdown.js.coffee
@@ -565,8 +565,11 @@ class GitLabDropdown
if $el.length and currentIndex > -1
e.preventDefault()
e.stopImmediatePropagation()
- $el.first().trigger('click')
- $el.first().get(0).click?()
+
+ if $el.first().get(0).click?
+ $el.first().get(0).click()
+ else
+ $el.first().trigger('click')
addArrowKeyEvent: ->
ARROW_KEY_CODES = [38, 40]