summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorLuke Bennett <lukeeeebennettplus@gmail.com>2016-07-28 17:32:43 +0100
committerLuke Bennett <lukeeeebennettplus@gmail.com>2016-08-18 18:17:56 +0100
commit49c7ca2a27639809dd84975d7595787ab5f60647 (patch)
tree642528560e1accae7e689d3cc667f786af82fe5a /app
parentf91fd18f25626dc3e76c9aefef2841f685fab26c (diff)
downloadgitlab-ce-49c7ca2a27639809dd84975d7595787ab5f60647.tar.gz
Fixed spec and improved formatting
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/gl_dropdown.js4
-rw-r--r--app/assets/javascripts/search_autocomplete.js2
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: