Merge branch '48461-search-dropdown-hides-shows-when-typing' into 'master'

Resolve "Search dropdown hides & shows when typing"

Closes #48461

See merge request gitlab-org/gitlab-ce!20187
This commit is contained in:
Mike Greiling 2018-06-27 07:00:11 +00:00
commit c03701b9f7
2 changed files with 8 additions and 3 deletions

View File

@ -289,7 +289,7 @@ export default class SearchAutocomplete {
}
// If the dropdown is closed, we'll open it
if (!this.dropdown.hasClass('open')) {
if (!this.dropdown.hasClass('show')) {
this.loadingSuggestions = false;
this.dropdownToggle.dropdown('toggle');
return this.searchInput.removeClass('disabled');
@ -424,9 +424,9 @@ export default class SearchAutocomplete {
}
disableAutocomplete() {
if (!this.searchInput.hasClass('disabled') && this.dropdown.hasClass('open')) {
if (!this.searchInput.hasClass('disabled') && this.dropdown.hasClass('show')) {
this.searchInput.addClass('disabled');
this.dropdown.removeClass('open').trigger('hidden.bs.dropdown');
this.dropdown.removeClass('show').trigger('hidden.bs.dropdown');
this.restoreMenu();
}
}

View File

@ -0,0 +1,5 @@
---
title: Fix loading screen for search autocomplete dropdown
merge_request:
author:
type: fixed