summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-07-13 10:09:16 +0100
committerPhil Hughes <me@iamphill.com>2016-07-20 12:15:46 +0100
commit1b55e5af5c417a2a10ffb3af4dcef947f693ee74 (patch)
treef3f6adc5693c256d73ceb55d1f8ce84ee162575f /app
parentc1f0b7fcf0a28110ed4465a8afed254a4e33d5ee (diff)
downloadgitlab-ce-1b55e5af5c417a2a10ffb3af4dcef947f693ee74.tar.gz
Fixed dropdown enter key when searching
Closes #19741
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/gl_dropdown.js.coffee5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/assets/javascripts/gl_dropdown.js.coffee b/app/assets/javascripts/gl_dropdown.js.coffee
index 951530e03a5..f0b52bb7f29 100644
--- a/app/assets/javascripts/gl_dropdown.js.coffee
+++ b/app/assets/javascripts/gl_dropdown.js.coffee
@@ -35,6 +35,8 @@ class GitLabDropdownFilter
$inputContainer.removeClass HAS_VALUE_CLASS
if keyCode is 13
+ if @input.val() isnt "" and @options.enterCallback
+ @options.enterCallback(e)
return false
# Only filter asynchronously only if option remote is set
@@ -212,6 +214,9 @@ class GitLabDropdown
callback: (data) =>
currentIndex = -1
@parseData data
+ enterCallback: (e) =>
+ @selectRowAtIndex(e, 0)
+
# Event listeners