summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-01-20 16:06:38 +0000
committerPhil Hughes <me@iamphill.com>2017-01-21 20:05:02 +0000
commit8198d49801d91510fe11c53ce184cf750bd06c49 (patch)
treeb7fb61f99fbebeb8a98b738972299580174df5d8
parent4a797620e8dd92519bf43dfb36e7e09de0c9e739 (diff)
downloadgitlab-ce-8198d49801d91510fe11c53ce184cf750bd06c49.tar.gz
Places dropdown at cursor position
-rw-r--r--app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js.es63
1 files changed, 2 insertions, 1 deletions
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 f3750c2b23e..42c673a5106 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
@@ -88,7 +88,8 @@
this.font = window.getComputedStyle(this.filteredSearchInput).font;
}
- const inputText = gl.DropdownUtils.getSearchInput(this.filteredSearchInput).trim();
+ const input = this.filteredSearchInput;
+ const inputText = input.value.slice(0, input.selectionStart);
const filterIconPadding = 27;
const offset = gl.text.getTextWidth(inputText, this.font) + filterIconPadding;