diff options
author | Phil Hughes <me@iamphill.com> | 2016-07-20 14:07:12 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-07-20 14:07:12 +0100 |
commit | 71bb7bdf612097aa05cbd654f720d25d36598f17 (patch) | |
tree | df322369521f63118e1c9027194c963ab0a65aab | |
parent | dc1c7b7fc1e95bd80274e9bab27e0ba082087770 (diff) | |
download | gitlab-ce-71bb7bdf612097aa05cbd654f720d25d36598f17.tar.gz |
Fixed issue where using arrow keys would require arrow key to be pressed twicegl-dropdown-enter-key-fix
-rw-r--r-- | app/assets/javascripts/gl_dropdown.js.coffee | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/assets/javascripts/gl_dropdown.js.coffee b/app/assets/javascripts/gl_dropdown.js.coffee index d60935cbb52..7086ece29b8 100644 --- a/app/assets/javascripts/gl_dropdown.js.coffee +++ b/app/assets/javascripts/gl_dropdown.js.coffee @@ -35,8 +35,6 @@ 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,7 +210,6 @@ class GitLabDropdown data: => return @fullData callback: (data) => - currentIndex = -1 @parseData data unless @filterInput.val() is '' @@ -225,8 +222,8 @@ class GitLabDropdown .first() .find('a') .addClass('is-focused') - enterCallback: (e) => - @selectRowAtIndex(e, 0) + + currentIndex = 0 # Event listeners |