js: Fix that the menu is not reloaded in case no search is available

fixes #12541
This commit is contained in:
Johannes Meyer 2016-08-25 08:54:04 +02:00
parent 124fb848a0
commit 1993ae2ed2
1 changed files with 2 additions and 3 deletions

View File

@ -60,10 +60,9 @@
if ($search[0] === document.activeElement) {
return null;
}
var search = $container.find('#search').val();
if (search.length) {
if ($search.length) {
var $content = $('<div></div>').append(content);
$content.find('#search').attr('value', search).addClass('active');
$content.find('#search').attr('value', $search.val()).addClass('active');
return $content.html();
}
return content;