diff options
Diffstat (limited to 'app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js.es6')
-rw-r--r-- | app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js.es6 | 7 |
1 files changed, 2 insertions, 5 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 031e4f9b127..9edb6ade4f2 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 @@ -62,16 +62,13 @@ // Get the string to replace const selectionStart = input.selectionStart; - let { left, right } = gl.DropdownUtils.getInputSelectionPosition(input); + const { left } = gl.DropdownUtils.getInputSelectionPosition(input); + let { right } = gl.DropdownUtils.getInputSelectionPosition(input); if (right < 0) { right = inputValue.length; } - if (left < 0) { - left += 1; - } - input.value = `${inputValue.substr(0, left)}${word}${inputValue.substr(right + selectionStart)}`; gl.FilteredSearchDropdownManager.updateInputCaretPosition(selectionStart, input); } |