Commit 716ac262 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Close all open dropdowns when search input is clicked

parent f3a3bd50
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment