diff options
author | Luke Bennett <lukeeeebennettplus@gmail.com> | 2016-07-28 17:32:43 +0100 |
---|---|---|
committer | Luke Bennett <lukeeeebennettplus@gmail.com> | 2016-08-18 18:17:56 +0100 |
commit | 49c7ca2a27639809dd84975d7595787ab5f60647 (patch) | |
tree | 642528560e1accae7e689d3cc667f786af82fe5a /app | |
parent | f91fd18f25626dc3e76c9aefef2841f685fab26c (diff) | |
download | gitlab-ce-49c7ca2a27639809dd84975d7595787ab5f60647.tar.gz |
Fixed spec and improved formatting
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/gl_dropdown.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/search_autocomplete.js | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/gl_dropdown.js b/app/assets/javascripts/gl_dropdown.js index aacc49be1ac..58e27acf2f1 100644 --- a/app/assets/javascripts/gl_dropdown.js +++ b/app/assets/javascripts/gl_dropdown.js @@ -690,8 +690,8 @@ if (!index) { $dropdownContent.scrollTop(0) } else if (index === ($listItems.length - 1)) { - $dropdownContent.scrollTop $dropdownContent.prop('scrollHeight'); - } else if (listItemBottom > (dropdownContentBottom + dropdownScrollTop)) + $dropdownContent.scrollTop($dropdownContent.prop('scrollHeight')); + } else if (listItemBottom > (dropdownContentBottom + dropdownScrollTop)) { $dropdownContent.scrollTop(listItemBottom - dropdownContentBottom + CURSOR_SELECT_SCROLL_PADDING); } else if (listItemTop < (dropdownContentTop + dropdownScrollTop)) { return $dropdownContent.scrollTop(listItemTop - dropdownContentTop - CURSOR_SELECT_SCROLL_PADDING); diff --git a/app/assets/javascripts/search_autocomplete.js b/app/assets/javascripts/search_autocomplete.js index cd39f5f94e2..4579214bd2f 100644 --- a/app/assets/javascripts/search_autocomplete.js +++ b/app/assets/javascripts/search_autocomplete.js @@ -228,7 +228,7 @@ case KEYCODE.ENTER: this.disableAutocomplete(); break; - case KEYCODE.UP, + case KEYCODE.UP: case KEYCODE.DOWN: return; default: |