diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-11-17 15:38:17 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-11-17 15:38:17 +0300 |
commit | aa841e6fe104d90f1f784e7df12223774cd2591c (patch) | |
tree | 103177263f7cebb54bce5fd895a438d1ba03d99c /app/assets/javascripts | |
parent | b0de0ce85b0ccddeba62a1faf015d8a488890fc9 (diff) | |
parent | f9646d3e04a41aaeb6a2e604622ecad88a961641 (diff) |
Merge branch 'highlight-first-user-autocomplete-option' into 'master'
Highlight first user autocomplete option
See merge request !7520
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/gfm_auto_complete.js.es6 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/gfm_auto_complete.js.es6 b/app/assets/javascripts/gfm_auto_complete.js.es6 index 58c1179d250..5d9ac4d350a 100644 --- a/app/assets/javascripts/gfm_auto_complete.js.es6 +++ b/app/assets/javascripts/gfm_auto_complete.js.es6 @@ -35,7 +35,7 @@ DefaultOptions: { sorter: function(query, items, searchKey) { // Highlight first item only if at least one char was typed - this.setting.highlightFirst = query.length > 0; + this.setting.highlightFirst = this.setting.alwaysHighlightFirst || query.length > 0; if ((items[0].name != null) && items[0].name === 'loading') { return items; } @@ -112,6 +112,7 @@ insertTpl: '${atwho-at}${username}', searchKey: 'search', data: ['loading'], + alwaysHighlightFirst: true, callbacks: { sorter: this.DefaultOptions.sorter, filter: this.DefaultOptions.filter, |