forked from extern/the-glorious-startpage
hide suggestions on searchbox close
This commit is contained in:
parent
3814cf563f
commit
2c3f2dfc3f
@ -7,9 +7,10 @@ class AutoSuggestion {
|
||||
this._registerSearchBoxOnKeyUpEvent();
|
||||
}
|
||||
|
||||
_hideSuggestions = () => {
|
||||
hideSuggestions = () => {
|
||||
// Hide suggestions
|
||||
this._suggestionsContainer.classList.remove('suggestionsShow');
|
||||
this._suggestionsUL.innerHTML = '';
|
||||
}
|
||||
|
||||
_showSuggestions = () => {
|
||||
@ -122,7 +123,7 @@ class AutoSuggestion {
|
||||
|
||||
if (this._searchBox.value < 1) {
|
||||
// Hide suggestions
|
||||
this._hideSuggestions();
|
||||
this.hideSuggestions();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ class SearchBoxShow {
|
||||
this._searchBox.value = '';
|
||||
|
||||
// Hide suggestions
|
||||
console.warn('hideSuggestions()');
|
||||
autoSuggestion.hideSuggestions();
|
||||
|
||||
this._searchBoxVisility = !this._searchBoxVisility;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user