Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-01-20 21:04:15 +0300
committerPhil Hughes <me@iamphill.com>2017-01-21 23:05:02 +0300
commit317ef7b51c680503b01c88b8d8fdb09bd1a515e8 (patch)
treebcc0cab6e4301b9300b4758b18dcfe0d396c492c /app/assets
parent8198d49801d91510fe11c53ce184cf750bd06c49 (diff)
Fixed failing JS specs
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/filtered_search/dropdown_utils.js.es63
-rw-r--r--app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js.es61
2 files changed, 1 insertions, 3 deletions
diff --git a/app/assets/javascripts/filtered_search/dropdown_utils.js.es6 b/app/assets/javascripts/filtered_search/dropdown_utils.js.es6
index f5d2eb9ae76..6910cf171d4 100644
--- a/app/assets/javascripts/filtered_search/dropdown_utils.js.es6
+++ b/app/assets/javascripts/filtered_search/dropdown_utils.js.es6
@@ -76,7 +76,6 @@
}
static getSearchInput(filteredSearchInput) {
- const selectionStart = filteredSearchInput.selectionStart;
const inputValue = filteredSearchInput.value;
const { right } = gl.DropdownUtils.getInputSelectionPosition(filteredSearchInput);
@@ -88,7 +87,7 @@
let inputValue = input.value;
// Replace all spaces inside quote marks with underscores
// This helps with matching the beginning & end of a token:key
- inputValue = inputValue.replace(/"(.*?)"/g, str => str.replace(/\s/g, '_') );
+ inputValue = inputValue.replace(/"(.*?)"/g, str => str.replace(/\s/g, '_'));
// Get the right position for the word selected
// Regex matches first space
diff --git a/app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js.es6 b/app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js.es6
index 42c673a5106..04873115580 100644
--- a/app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js.es6
+++ b/app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js.es6
@@ -73,7 +73,6 @@
// Sometimes can end up at end of input
input.setSelectionRange(selectionStart, selectionStart);
- const inputValue = input.value;
const { right } = gl.DropdownUtils.getInputSelectionPosition(input);
input.setSelectionRange(right, right);