Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-12-05 00:41:33 +0300
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-12-05 21:03:28 +0300
commit716ac262032890fb771f410bd5f2c5444f51c2e2 (patch)
treecfe3384615d642c1c5c7d089b412e1bca2fe60ec
parentf3a3bd50eafdcfcaeea21d6cfa0b8bbae7720fec (diff)
Close all open dropdowns when search input is clicked
-rw-r--r--app/assets/javascripts/search_autocomplete.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/assets/javascripts/search_autocomplete.js b/app/assets/javascripts/search_autocomplete.js
index 9dec5d7645a..5eb38006e61 100644
--- a/app/assets/javascripts/search_autocomplete.js
+++ b/app/assets/javascripts/search_autocomplete.js
@@ -281,6 +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');
return e.stopImmediatePropagation();
}
@@ -305,6 +307,7 @@ 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();