Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
f9646d3e
Commit
f9646d3e
authored
Nov 17, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Highlight first user autocomplete option
parent
c69e3942
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
app/assets/javascripts/gfm_auto_complete.js.es6
app/assets/javascripts/gfm_auto_complete.js.es6
+2
-2
No files found.
app/assets/javascripts/gfm_auto_complete.js.es6
View file @
f9646d3e
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
DefaultOptions: {
DefaultOptions: {
sorter: function(query, items, searchKey) {
sorter: function(query, items, searchKey) {
// Highlight first item only if at least one char was typed
// 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') {
if ((items[0].name != null) && items[0].name === 'loading') {
return items;
return items;
}
}
...
@@ -117,6 +117,7 @@
...
@@ -117,6 +117,7 @@
insertTpl: '${atwho-at}${username}',
insertTpl: '${atwho-at}${username}',
searchKey: 'search',
searchKey: 'search',
data: ['loading'],
data: ['loading'],
alwaysHighlightFirst: true,
callbacks: {
callbacks: {
sorter: this.DefaultOptions.sorter,
sorter: this.DefaultOptions.sorter,
filter: this.DefaultOptions.filter,
filter: this.DefaultOptions.filter,
...
@@ -363,4 +364,3 @@
...
@@ -363,4 +364,3 @@
};
};
}).call(this);
}).call(this);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment