diff options
author | Yann Gravrand <y.gravrand@gmail.com> | 2016-10-26 23:02:36 +0200 |
---|---|---|
committer | Yann Gravrand <y.gravrand@gmail.com> | 2016-11-06 16:26:43 +0100 |
commit | 4896ffe5f9f4ce1f5b32f9dd0c27189aefad2a42 (patch) | |
tree | e8ac103b7f5f91f1da5566b21fcd96616148538a | |
parent | c392b0cc24ba40e3fed920c6c693cb24665193af (diff) | |
download | gitlab-ce-4896ffe5f9f4ce1f5b32f9dd0c27189aefad2a42.tar.gz |
Fixes #22058 and #23578
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | app/assets/javascripts/gfm_auto_complete.js.es6 | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ed09fb1db8..ca35572b0c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ entry. - Trim leading and trailing whitespace on project_path (Linus Thiel) - Prevent award emoji via notes for issues/MRs authored by user (barthc) - Adds support for the `token` attribute in project hooks API (Gauvain Pocentek) +- Change auto selection behaviour of emoji and slash commands to be more UX/Type friendly (Yann Gravrand) - Adds an optional path parameter to the Commits API to filter commits by path (Luis HGO) - Fix Markdown styling inside reference links (Jan Zdráhal) - Create new issue board list after creating a new label diff --git a/app/assets/javascripts/gfm_auto_complete.js.es6 b/app/assets/javascripts/gfm_auto_complete.js.es6 index 824413bf20f..e72e2194be8 100644 --- a/app/assets/javascripts/gfm_auto_complete.js.es6 +++ b/app/assets/javascripts/gfm_auto_complete.js.es6 @@ -34,6 +34,8 @@ }, DefaultOptions: { sorter: function(query, items, searchKey) { + // Highlight first item only if at least one char was typed + this.setting.highlightFirst = query.length > 0; if ((items[0].name != null) && items[0].name === 'loading') { return items; } @@ -182,6 +184,7 @@ insertTpl: '${atwho-at}"${title}"', data: ['loading'], callbacks: { + sorter: this.DefaultOptions.sorter, beforeSave: function(milestones) { return $.map(milestones, function(m) { if (m.title == null) { @@ -236,6 +239,7 @@ displayTpl: this.Labels.template, insertTpl: '${atwho-at}${title}', callbacks: { + sorter: this.DefaultOptions.sorter, beforeSave: function(merges) { var sanitizeLabelTitle; sanitizeLabelTitle = function(title) { |