From 31d9c1a6839eaf74bace8c22631c02c014bb17a0 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Wed, 27 Jun 2018 07:00:11 +0000 Subject: [PATCH] Resolve "Search dropdown hides & shows when typing" --- app/assets/javascripts/search_autocomplete.js | 6 +++--- .../48461-search-dropdown-hides-shows-when-typing.yml | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 changelogs/unreleased/48461-search-dropdown-hides-shows-when-typing.yml diff --git a/app/assets/javascripts/search_autocomplete.js b/app/assets/javascripts/search_autocomplete.js index 2f4e4881f24..5b2e0468784 100644 --- a/app/assets/javascripts/search_autocomplete.js +++ b/app/assets/javascripts/search_autocomplete.js @@ -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(); } } diff --git a/changelogs/unreleased/48461-search-dropdown-hides-shows-when-typing.yml b/changelogs/unreleased/48461-search-dropdown-hides-shows-when-typing.yml new file mode 100644 index 00000000000..2ebc22dbf8f --- /dev/null +++ b/changelogs/unreleased/48461-search-dropdown-hides-shows-when-typing.yml @@ -0,0 +1,5 @@ +--- +title: Fix loading screen for search autocomplete dropdown +merge_request: +author: +type: fixed