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
Boxiang Sun
gitlab-ce
Commits
2c7ba7a1
Commit
2c7ba7a1
authored
Dec 06, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates the dropdown to match the docs and remove old hack of stop event propagation
parent
b4fb31d9
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
71 deletions
+77
-71
app/assets/javascripts/search_autocomplete.js
app/assets/javascripts/search_autocomplete.js
+75
-68
app/views/layouts/_search.html.haml
app/views/layouts/_search.html.haml
+2
-1
spec/javascripts/search_autocomplete_spec.js
spec/javascripts/search_autocomplete_spec.js
+0
-2
No files found.
app/assets/javascripts/search_autocomplete.js
View file @
2c7ba7a1
This diff is collapsed.
Click to expand it.
app/views/layouts/_search.html.haml
View file @
2c7ba7a1
...
...
@@ -13,7 +13,8 @@
.location-badge
=
label
.search-input-wrap
.dropdown
{
data:
{
url:
search_autocomplete_path
}
}
=
search_field_tag
'search'
,
nil
,
placeholder:
'Search'
,
class:
'search-input dropdown-menu-toggle no-outline js-search-dashboard-options'
,
spellcheck:
false
,
tabindex:
'1'
,
autocomplete:
'off'
,
data:
{
toggle:
'dropdown'
,
issues_path:
issues_dashboard_url
,
mr_path:
merge_requests_dashboard_url
},
aria:
{
label:
'Search'
}
=
search_field_tag
'search'
,
nil
,
placeholder:
'Search'
,
class:
'search-input dropdown-menu-toggle no-outline js-search-dashboard-options'
,
spellcheck:
false
,
tabindex:
'1'
,
autocomplete:
'off'
,
data:
{
issues_path:
issues_dashboard_url
,
mr_path:
merge_requests_dashboard_url
},
aria:
{
label:
'Search'
}
%button
.hidden.js-dropdown-search-toggle
{
data:
{
toggle:
'dropdown'
}}
.dropdown-menu.dropdown-select
=
dropdown_content
do
%ul
...
...
spec/javascripts/search_autocomplete_spec.js
View file @
2c7ba7a1
...
...
@@ -191,8 +191,6 @@ import '~/lib/utils/common_utils';
// browsers will not trigger default behavior (form submit, in this
// example) on JavaScript-created keypresses.
expect
(
submitSpy
).
not
.
toHaveBeenTriggered
();
// Does a worse job at capturing the intent of the test, but works.
expect
(
enterKeyEvent
.
isDefaultPrevented
()).
toBe
(
true
);
});
});
}).
call
(
window
);
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