diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2017-11-22 17:24:31 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2017-11-22 17:24:31 +0000 |
commit | 0c972f56b8193c173fffeccf1c9080c0682071e2 (patch) | |
tree | beea41599cae455cd8513d501f911434d9245e8b | |
parent | 5083e0cf70b4c6cd0131b22bc670cac04626c161 (diff) | |
parent | 0b3e3692eb95a68897b4896d168e6763ac0a97b9 (diff) | |
download | gitlab-ce-0c972f56b8193c173fffeccf1c9080c0682071e2.tar.gz |
Merge branch '38877-disable-autocomplete-in-filtered-search' into 'master'
Disables autocomplete in filtered search
Closes #38877
See merge request gitlab-org/gitlab-ce!15477
-rw-r--r-- | app/helpers/search_helper.rb | 3 | ||||
-rw-r--r-- | changelogs/unreleased/38877-disable-autocomplete-in-filtered-search.yml | 5 | ||||
-rw-r--r-- | spec/helpers/search_helper_spec.rb | 4 |
3 files changed, 11 insertions, 1 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index cf28a917fd1..2f57660516d 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -140,7 +140,8 @@ module SearchHelper placeholder: 'Search or filter results...', data: { 'username-params' => @users.to_json(only: [:id, :username]) - } + }, + autocomplete: 'off' } if @project.present? diff --git a/changelogs/unreleased/38877-disable-autocomplete-in-filtered-search.yml b/changelogs/unreleased/38877-disable-autocomplete-in-filtered-search.yml new file mode 100644 index 00000000000..07439a860ec --- /dev/null +++ b/changelogs/unreleased/38877-disable-autocomplete-in-filtered-search.yml @@ -0,0 +1,5 @@ +--- +title: Disables autocomplete in filtered searc +merge_request: 15477 +author: Jacopo Beschi @jacopo-beschi +type: added diff --git a/spec/helpers/search_helper_spec.rb b/spec/helpers/search_helper_spec.rb index ab647401e14..6c9a7febf14 100644 --- a/spec/helpers/search_helper_spec.rb +++ b/spec/helpers/search_helper_spec.rb @@ -102,6 +102,10 @@ describe SearchHelper do it 'includes project base-endpoint' do expect(search_filter_input_options('')[:data]['base-endpoint']).to eq(project_path(@project)) end + + it 'includes autocomplete=off flag' do + expect(search_filter_input_options('')[:autocomplete]).to eq('off') + end end context 'group' do |