From b4fb31d9dd12cf979d4014f028aa9ef2de342249 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Gray Date: Tue, 5 Dec 2017 13:41:51 -0700 Subject: [PATCH] Revert to adding open class to dropdowns --- app/assets/javascripts/search_autocomplete.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/search_autocomplete.js b/app/assets/javascripts/search_autocomplete.js index 5eb38006e61..501815ecfac 100644 --- a/app/assets/javascripts/search_autocomplete.js +++ b/app/assets/javascripts/search_autocomplete.js @@ -281,8 +281,8 @@ import { isInGroupsPage, isInProjectPage, getGroupSlug, getProjectSlug } from '. // Avoid falsy value to be returned onSearchInputClick(e) { - $('.dropdown.open .dropdown-toggle').dropdown('toggle'); - this.dropdown.dropdown('toggle'); + $('.dropdown').removeClass('open'); + this.dropdown.addClass('open'); return e.stopImmediatePropagation(); } @@ -307,7 +307,6 @@ import { isInGroupsPage, isInProjectPage, getGroupSlug, getProjectSlug } from '. onSearchInputBlur(e) { this.isFocused = false; this.wrap.removeClass('search-active'); - $('.search-input-wrap').removeClass('open'); // If input is blank then restore state if (this.searchInput.val() === '') { return this.restoreOriginalState();