diff options
author | Phil Hughes <me@iamphill.com> | 2016-07-13 10:09:16 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-07-20 12:15:46 +0100 |
commit | 1b55e5af5c417a2a10ffb3af4dcef947f693ee74 (patch) | |
tree | f3f6adc5693c256d73ceb55d1f8ce84ee162575f /app | |
parent | c1f0b7fcf0a28110ed4465a8afed254a4e33d5ee (diff) | |
download | gitlab-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.coffee | 5 |
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 |