Update the icon state as well if the search box is emptied

This commit is contained in:
nietonfir 2017-07-09 22:57:19 +02:00
parent 366bc21c5c
commit b5df43cfbf

View File

@ -538,10 +538,10 @@
var value = e.target.value; var value = e.target.value;
if (value) { if (value) {
$search.classList.add('search--active'); $search.classList.add('search--active');
search(value);
} else { } else {
$search.classList.remove('search--active'); $search.classList.remove('search--active');
} }
search(value);
}, 250), false); }, 250), false);
$searchClose.addEventListener('click', function(e) { $searchClose.addEventListener('click', function(e) {
e.stopPropagation(); e.stopPropagation();