diff options
author | Phil Hughes <me@iamphill.com> | 2016-07-13 12:09:16 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-07-20 14:15:46 +0300 |
commit | 1b55e5af5c417a2a10ffb3af4dcef947f693ee74 (patch) | |
tree | f3f6adc5693c256d73ceb55d1f8ce84ee162575f /app/assets/javascripts | |
parent | c1f0b7fcf0a28110ed4465a8afed254a4e33d5ee (diff) |
Fixed dropdown enter key when searching
Closes #19741
Diffstat (limited to 'app/assets/javascripts')
-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 |